import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List
import Data.Char

solve k s = take (k-1) s ++ [toLower $ s!!(k-1)] ++ drop k s

main = solve <$> (read . head . tail . words <$> getLine) <*> getLine >>= putStrLn