fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(" ").map { it.toInt() }
    val S = readLine()!!
    println(String(S.mapIndexed { i, c -> if (i == K - 1) map[c]!! else c }.toCharArray()))
}

val map = mapOf('A' to 'a', 'B' to 'b', 'C' to 'c')