import Text.Printf
import Data.Char

main :: IO()
main = do
    [_,k] <- map read . words <$> getLine
    str <- getLine
    putStrLn $ getsolve str k

getsolve :: String -> Int -> String
getsolve str num = (take (num - 1) str) ++ [toLower (str !! (num - 1))] ++ (drop num str)


