import java.util.Scanner

val sc = Scanner(System.`in`)
val n = sc.nextInt()
val k = sc.nextInt()
val s = sc.next()

fun main(args: Array<String>) {
    var rst: String = ""
    for (i in 0 until n) {
        if (k-1 == i) {
            rst += if ('A' == s[i]) {
                "a"
            } else if ('B' == s[i]) {
                "b"
            } else {
                "c"
            }
        } else {
            rst += s[i]
        }
    }
    println(rst)
}