process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var input = lines[0].split(' ');
 var num = input[1];
 var inst = lines[1].split('');

inst[num-1] = inst[num-1].toLowerCase();
console.log(inst.join(''));
 
});