import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    scanner.nextInt()
    val k = scanner.nextInt()
    val s = scanner.next()
    s.forEachIndexed { i, c ->
        if ((i + 1) == k) print(c.toLowerCase())
        else print(c)
    }
}
