import Data.Char (toLower)

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

solve :: String -> Int -> Int -> String
solve (c:cs) i k
  | i == k    = toLower c : cs
  | otherwise = c : solve cs (i+1) k