n = int(input())
s = ['a'] * n
ans = []
ans.append(''.join(s))
for i in range(1,n):
    for j in range(i,n):
        s = ['a'] * n
        s[j] = 'b'
        ans.append(''.join(s))
ans.sort()
for i in ans:
    print(i)
