import Control.Monad
main = do
    n <- read <$> getLine :: IO Int
    mapM putStrLn (solve n)

solve :: Int -> [String]
solve 1 = ["a"]
solve n = [cs++[c] | cs <- solve (n-1),c <- ['a'..succ $ last cs],c <= 'z']