'use strict';
(function(input){
  input=input.trim().split(/\s+/);
  const N=input[0]-0;
  const K=input[1]-0;
  var ans=input[2].split('');
  if(ans[K-1]==='A')ans[K-1]='a';
  if(ans[K-1]==='B')ans[K-1]='b';
  if(ans[K-1]==='C')ans[K-1]='c';
  ans=ans.join('');
  console.log(ans);
})(require('fs').readFileSync('/dev/stdin','utf8'));