object Main extends App {

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


  def solve() =  {
    s.updated(k-1, s(k-1).toLower)
  }

  println(solve)

}