import Data.Char main = getLine >>= putStrLn . solve where solve = foldr ff [] . zip [1..] ff (i, c) acc = cvt i c : acc b = ord 'A' e = ord 'Z' cvt i c = chr . check $ ord c - i where check n | n < b = check $ e + n - b + 1 | otherwise = n