import Foundation

let input_line1 = readLine()!
let input_line2 = readLine()!

let split = input_line1.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let length = Int(split[0])!
let changePosition = Int(split[1])!
var targetCharacter = Array(input_line2.characters)
let changedCharacter = String(targetCharacter[changePosition - 1]).lowercaseString
targetCharacter[changePosition - 1] = Array(changedCharacter.characters)[0]

print(String(targetCharacter))