

fun main(args: Array<String>) {
    var (_,k) = readLine()!!.split(" ").map(String::toInt)
    k--
    var s = readLine()!!.toMutableList()
    
    s[k] = s[k].toLowerCase()
    println(s.joinToString(separator=""))
}