import           Data.Char                      ( toLower )

main = map (read :: String -> Int) . words <$> getLine >>= \_x ->
  case _x of
      [_, k] -> getLine >>= \s ->
        return
          $ let _h = take (k - 1) s
                _b = toLower (s !! (k - 1))
                _t = drop k s
            in  _h ++ [_b] ++ _t
    >>= putStrLn
