import Control.Applicative
import Data.Char
 
main :: IO ()
main = do
    [_, b] <- map read . words <$> getLine
    xs <- getLine
    putStrLn $ solve xs b
    
solve :: String -> Int -> String
solve xs n = (take (n-1) xs) ++ ((toLower (xs !! (n-1))) : (drop n xs) )