object Main extends App {

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


  def solve() =  {
    val arr = s.toArray
    arr(k-1) = arr(k-1) match {
      case 'A' => 'a'
      case 'B' => 'b'
      case 'C' => 'c'
    }
    arr.mkString("")
  }

  println(solve)

}
