fun main(args: Array<String>){
    val l1 = readLine()!!.split(" ").map { it.toInt() }
    val l2 = readLine()!!
    var result = ""
    for(i in 1..l1[0]){
        if(i == l1[1]){
            result +=l2[i-1].toLowerCase()
        }else{
            result += l2[i-1]
        }
    }
    println(result)
}