solve :: Int -> String solve x = reverse $ map (\n -> a !! n) $ f x where a = ['A'..'Z'] f x = mod x 26 : if x < 26 then [] else f (div x 26 - 1) where main = getLine >>= putStrLn . solve . read