fun main(args: Array<String>) {
  val first = readLine()!!.split(" ")
  val n = Integer.parseInt(first[0])
  val k = Integer.parseInt(first[1])
  val s = readLine()!!
  val t = s.get(k - 1)
  var after = ""
  
  when (t) {
    'A' -> {
        after = "a"
    }
    'B' -> {
        after = "b"
    }
    'C' -> {
        after = "c"
    }
  }
  
  var a1 = s.substring(0, k - 1)
  val a2 = s.substring(k)
  val result = a1 + after + a2
  println(result)
}