import sys
sys.setrecursionlimit(10000)
words = set()
alphabet = [chr(i) for i in range(97, 97+26)]
def add(s,j):
    if len(s) == n:
        words.add(s)
    else:
        s += j
        for i in alphabet:
            add(s,i)
n = int(input())
for i in alphabet:
    add("",i)
words = list(words)
words.sort()
#print(words)
words = words[0:n]
#print(words)
for word in words:
    print(word)