fun main(args: Array<String>) {
    // data
    val map = mapOf('A' to 'a', 'B' to 'b', 'C' to 'c')

    // input
    val (length, index) = readLine()?.let { it.split(" ") }!!.map { it.toInt() }
    val text = readLine() ?: throw RuntimeException("no input.")

    // process
    val target = text.get(index - 1)

    // println(text.replace(target, map.get(target) ?: 'x'))
    println(text.substring(0..index-2)
            + map.get(target)
            + text.substring(index, length)
    )
}