import           Data.Char
import qualified Data.ByteString.Char8 as B

main :: IO ()
main = uncurry solve <$> getParams >>= B.putStrLn

getParams :: IO (Int, B.ByteString)
getParams = (,) <$> readLn <*> B.getLine

solve :: Int -> B.ByteString -> B.ByteString
solve n = B.map (rotate n)

rotate :: Int -> Char -> Char
rotate n = int2chr . rotateInt . chr2int
  where int2chr = chr . (+ basePoint)
        chr2int = subtract basePoint . ord
        rotateInt = (`mod` 26) . (+ n)
        basePoint = ord 'A'
