function main(input) {
   input = input.trim();
  const a = input.split("\n");
  const b = a[0].split(" ").map(Number);
  const c = a[1].split("");
  console.log(a[1].substring(0, b[1]-1) 
              + a[1].charAt(b[1]-1).toLowerCase() 
              + a[1].substring(b[1]));
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));