import           Control.Monad
import qualified Data.ByteString.Char8         as BS
import           Data.List
import           Data.Char
import           Data.Maybe
import           Data.Ord
import           Data.Time
import qualified Data.Vector                   as VC
import qualified Data.Vector.Mutable           as VM

readIntegers :: IO [Integer]
readIntegers = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine

readIntegerLists :: Int -> IO [[Integer]]
readIntegerLists n =
  replicateM n (map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine)

readInts :: IO [Int]
readInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

readIntLists :: Int -> IO [[Int]]
readIntLists n =
  replicateM n (map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine)

readStrings :: IO [String]
readStrings = map BS.unpack . BS.words <$> BS.getLine

readStringLists :: Int -> IO [[String]]
readStringLists n = replicateM n (map BS.unpack . BS.words <$> BS.getLine)

main :: IO ()
main = do
  [n, k] <- readInts
  s      <- getLine
  putStrLn $ solve s k
  return ()

solve :: String -> Int -> String
solve s k = a ++ [(toLower $ head b)] ++ (tail b)
  where (a, b) = splitAt (k - 1) s
