import Data.Char (toLower)

main :: IO ()
main = do
  (_ : k : _) <- map read . words <$> getLine :: IO [Int]
  s <- getLine :: IO String
  let
    (pr, (c : sf)) = splitAt (pred k) s
    s' = pr ++ (toLower c : sf)
  putStrLn s'
