object Main extends App {
	val Array(n, k) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	val s = scala.io.StdIn.readLine.toList.toArray
	s(k-1) = (s(k-1).toInt + 32).toChar
	println(s.mkString)
}