import           Data.Char (toLower)

main :: IO ()
main = do
  [n, k] <- map read . words <$> getLine
  s <- getLine
  putStrLn $ solve n k s

solve :: Int -> Int -> String -> String
solve _ k s = take (k - 1) s ++ (toLower (s !! (k - 1)) : drop k s) where
