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