import itertools
from sys import exit

N = int(input())

seq = 'abcdefghij'
print('a' * N)
if N == 1:
    exit()

print('a' * (N - 1) + 'b')
if N == 2:
    exit()

for i in range(1, N - 1):
    lst = ['a'] * (N - i - 1) + ['b']
    it = itertools.product(seq[:i + 1], repeat=i)
    while True:
        try:
            print(''.join(map(str, lst + list(next(it)))))
        except StopIteration:
            break
    print(''.join(map(str, lst)) + seq[2:i+2])
