import Control.Applicative
import Data.Char (toLower)

main :: IO ()
main = solve <$> f <*> getLine >>= putStrLn
  where
    f = map read <$> words <$> getLine

solve :: [Int] -> String -> String
solve [n, k] s = as ++ (toLower b) : bs
  where
    (as, b:bs) = splitAt (k-1) s
