"use strict";
function Main(input) {
 const replaceMap = {
  A: 'a',
  B: 'b',
  C: 'c'
 };
 const args = input.split('\n');
 const argNK = args.shift().split(' ').map(m => parseInt(m));
 const N = argNK.shift();
 const K = argNK.shift() - 1;
 const S = args.shift();
 const ch = S.charAt(K);
 console.log(S.slice(0, K) + replaceMap[ch] + S.slice(K + 1));

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));