moji = ['a']
n = int(input())
count = 0
for i in range(n-1):
    count +=1
    for word in moji:
        if len(word) == count:
            tmp = ord(word[count - 1])
            for j in range(97, tmp + 2):
                newword = word + chr(j)
                moji.append(newword)
for words in moji:
    if len(words) == n:
        print(words)