import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import Data.Maybe (fromJust)
import Data.List (unfoldr, find)
import Data.Tuple (swap)

main :: IO ()
main = do
  let
    cs = unfoldr next (0, 1) :: [(Int, Int)]
      where
        next :: (Int, Int) -> Maybe ((Int, Int), (Int, Int))
        next (i, k) | i < 10    = Just ((i, 26 * pred k), (succ i, 26 * k))
                    | otherwise = Nothing
  n <- unsafeTextToInt <$> T.getLine :: IO Int
  let
    k = fst . fromJust . find ((pred n * 25 <) . snd) $ cs :: Int
    m = 26 * (pred $ 26 ^ pred k) `div` 25 :: Int
    ds = reverse . take k . unfoldr (Just . swap . (`divMod` 26)) $ pred n - m :: [Int]
  putStrLn . map (toEnum . (97 +)) $ ds

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
