import qualified Data.Map as Map 

main :: IO ()
main = do
  n <- readLn
  s <- getLine
  let l = list n
  let a = map (get l) s
  putStrLn a

listA :: String
listA = take 52 $  cycle ['A'..'Z']

listB :: Int -> String
listB n = drop n listA

list :: Int -> Map.Map Char Char
list a= Map.fromList . zip listA $ listB a

get :: Map.Map Char Char -> Char -> Char
get l k = Map.findWithDefault '0' k l 

