n = int(input())

a = ['b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

ans = ['a'] * n

print(''.join(ans))

# 桁 最後 to 1
count = 1
for i in reversed(range(1, n)):
    temp = ans[:]
    for j in range(i, n):
        current = a[j - i]
        for k in range(j, n):
            temp[k] = current
            print(''.join(temp))