let input = readLine()!.split(separator: " ").map { Int($0)! }
let N = input[0]
let K = input[1]
var S = Array(readLine()!)

S[K - 1] = Character(UnicodeScalar(S[K - 1].unicodeScalars.first!.value + 32)!)

print(String(S))
