import Data.Char

main = do
  [_, k] <- map read . words <$> getLine
  s <- getLine
  putStrLn $ f s k

f :: String -> Int -> String
f xs n = f' xs n 1
  where
    f' (x:xs) n 1
      | n == 1 = toLower x : xs
      | otherwise = x : f' xs (n - 1) 1