module Main where

import           Control.Monad
import           Data.Array.IO
import           Data.Char
import           Data.List
import           Data.List.Split
import           Data.Ord
import qualified Data.Vector.Unboxed as V
import           Text.Printf

main :: IO ()
main = do
  [n, k] <- map read . words <$> getLine :: IO [Int]
  s <- getLine
  forM_ [1 .. n]
    $ \i -> do
      if i == k
        then putChar $ toLower $ s !! (i - 1)
        else putChar $ s !! (i - 1)


