object Main {

  def main(args: Array[String]): Unit = {
    import scala.io.StdIn._

    val Array(n, k) = readLine().split(" ").map(_.toInt)
    val S = readLine()
    println(S.updated(k-1, S(k-1).toLower))
  }

}