"use strict";
function main(input) {
  const args = input.split("\n");
  const one = args[0].split(" ");

  const N = parseInt(one[0]);
  const K = parseInt(one[1]);
  const S = args[1];

  let S_first = S;
  let S_second = S;
  let S_third = S;

  let s = S_first.substr(K - 1, 1).toLowerCase();
  let ans = "";
  if(1 < K) {
      ans += S_second.substr(0, K - 1);
  }
  ans += s;
  if(K !== S.length) {
      ans += S_third.substr(K, S.length - 1);
  }

  console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
