import Data.Char

main = do
  (n:k:_) <- fmap (read :: String -> Int) . words <$> getLine
  (s:_) <- words <$> getLine
  putStrLn $ lower s k

lower s k = s1 ++ ((toLower s2) : s3)
  where
    s1 = take (k - 1) s
    s2 = s !! (k - 1)
    s3 = drop k s