import Data.Char

main=do
  [_,k]<-map read.words<$>getLine
  s<-getLine
  putStr$solve k 1 s

solve _ _ [] = []
solve k i (c:s)
  | k==i = toLower c:solve k (i+1)  s
  | otherwise = c:solve k (i+1) s