fun main(args: Array<String>) {
    val (x, y) = readLine()!!.split(" ").map { it.toInt() }
    val s = readLine()!!.toMutableList()
    when(s[y - 1]){
        'A' -> s[y - 1] = 'a'
        'B' -> s[y - 1] = 'b'
        'C' -> s[y - 1] = 'c'
    }
    for(i in 0 until x){
        print(s[i])
    }
}