{-# LANGUAGE BangPatterns #-}
module Main (main) where

import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as C8
import Data.Bool
import Data.Maybe
import Data.Char

main :: IO ()
main = do
  [n,k] <- readInts
  [s] <- readByteStrings
  print . showAnswer . solve $ (n,k,s)

type Input  = (Int,Int,ByteString)
type Output = ByteString

solve :: Input -> Output
solve (n,k,s) = C8.concat [s1, C8.singleton (toLower c), s3]
  where
    (s1, s2) = C8.splitAt (k-1) s
    c = C8.head s2
    s3 = C8.tail s2

showAnswer :: Output -> Answer
showAnswer = ByteString

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

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

readByteStrings :: IO [ByteString]
readByteStrings = C8.words <$> C8.getLine

data Answer
  = YesNo Bool
  | YESNO Bool
  | AB Bool
  | Number Int
  | String String
  | ByteString ByteString
  | Compare Ordering
  | Compare2 Ordering

instance Show Answer where
  show (YesNo b)       = bool "No" "Yes"  b
  show (YESNO b)       = bool "NO" "YES"  b
  show (AB b)          = bool "B"  "A"    b
  show (Number i)      = show i
  show (String s)      = s
  show (ByteString bs) = C8.unpack bs
  show (Compare o)     = ordering "<" "=" ">" o
  show (Compare2 o)    = ordering "Right" "Balanced" "Left" o

ordering :: a -> a -> a -> Ordering -> a
ordering lt eq gt o = case o of
  LT -> lt
  EQ -> eq
  GT -> gt

