
fun main(args:Array<String>) {
    val (N, K) = readLine()!!.split(" ").map{it.toInt()}
    var S = readLine()!!.map {it.toString()}.toMutableList()
    S[K-1] = S[K-1].toLowerCase()
    S.forEach(::print)
    println()
}

