x?(a,b)=if x then a else b
readInt :: String -> Int
readInt = read

main = do
  [n,k] <- map readInt.words<$>getLine
  s <- getLine
  putStrLn $ solve k s

solve :: Int -> String -> String
solve k = beam k 1 []

beam :: Int -> Int -> String -> String -> String
beam k i p (x:xs) = (k==i)?(ans,next) where
  ans = p ++ [low x] ++ xs
  next = beam k (i+1) p xs
  p' = p ++ [x]

low x
 | x == 'A' = 'a'
 | x == 'B' = 'b'
 | x == 'C' = 'c'
