fun main(args: Array<String>) {
    var input = readLine()!!
    val n = input.split(" ")[0].toInt()
    val k = input.split(" ")[1].toInt()
    val s = readLine()!!

    for (i in 0..(n-1)){
        if (i == k-1) print(s[i].toLowerCase())
        else print(s[i])
    }
}