'use strict'
function Main(input) {
    input = input.split('\n');
  	let textlen = parseInt(input[0].split(' ')[0]);
  	let target = parseInt(input[0].split(' ')[1]);
	let text = input[1].split("");
  	text[target-1] = text[target-1].toLowerCase();
    console.log('%s',text.join(''));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
