{-# LANGUAGE Safe #-}
import Data.Char
import Control.Applicative

loop n c= 
	let next = ord c - ord 'A' - n + 26
	in chr$next `mod` 26 + ord 'A'

run f (a,b)=f a b
main = putStrLn =<<fmap (run loop)<$>zip [1..] <$> getLine