import           Control.Monad
import           Control.Applicative
import           Data.List
import qualified Data.Map                      as M
import           Data.Char
--import qualified Data.Vector as V
--import qualified Data.Vector.Mutable as VM

getBysplit = map read . words <$> getLine

main :: IO ()
main = do
  [n, k] <- getBysplit :: IO [Int]
  s      <- getLine
  putStrLn $ solve [] s (k - 1)


solve :: String -> String -> Int -> String
solve acc s 0 = acc ++ (f s)
 where
  f :: String -> String
  f []       = undefined
  f (x : xs) = (toLower x) : xs
solve acc (s : xs) k = solve (acc ++ [s]) xs (k - 1)
