function Main(input) {
	lines = input.split("\n")
    i = lines[0].split(' ')[1]
    s = lines[1]
    ans = ((i > 1 ) ? s.slice(0, i - 1) : '') + s[i - 1].toLowerCase() + s.slice(i)
	console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
