import Data.List
import Data.Char

main::IO ()
main = do
    [_,k] <- map read . words <$> getLine
    text <- getLine
    let ans = (take (k-1) text) ++ [toLower $ text !! (k-1)] ++ (drop (k) text)
    print ans