function main(input) {
  var data = input.split(/\s|\n/);

  var N = data[0];
  var K = data[1];
  var S = data[2];

  var str = S.split("");

  str[K - 1] = str[K - 1].toLowerCase();

  var hoge = str.join("");

  console.log(hoge);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
