import java.util.*


fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    var N: Long
    N = sc.nextLong()
    var K: Long
    K = sc.nextLong()
    var S: String
    S = sc.next()
    solve(N, K, S)
}

fun solve(N: Long, K: Long, S: String) {
    val cs = S.toCharArray()
    cs[(K - 1).toInt()] = cs[(K - 1).toInt()].toLowerCase()
    println(cs)
}

