
object Main extends App {

  val Array(n, k) = scala.io.StdIn.readLine().split(" ").map(_.toInt)
  val arr = scala.io.StdIn.readLine().split("")


  def solve() =  {
    arr(k-1) = arr(k-1).toLowerCase
    arr.mkString("")
  }

  println(solve)

}