fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(" ").map(String::toInt)
    val S = readLine()!!.toCharArray()
    val d = 'a' - 'A'
    S[K - 1] = S[K - 1] + d
    println(S.joinToString(""))
}