object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val nk = sc.nextLine().split(" ")
    val s = sc.nextLine()
    val t = nk(1).toInt-1

    println(s.updated(t, s(t).toUpper))
  }
}
