import string
N = int(input())
abc = string.ascii_lowercase
ans = ['a']
for i in range(2, N):
    ans2 = []
    for a in ans:
        for b in abc[:i]:
            ans2 += [a + b]
    ans = ans2
print('\n'.join(ans))
