main :: IO ()
main = do
  [n,k] <- map read . words <$> getLine :: IO [Int]
  s <- getLine
  let c = case s!!(k-1) of 'A' -> 'a'
                           'B' -> 'b'
                           'C' -> 'c'
  putStrLn $ (take (k-1) s) ++ [c] ++ (drop (k) s)