import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

import itertools

n = int(readline())
bit = list(itertools.product([0, 1], repeat=(n - 1)))
if n == 1:
    print('a')
    exit()
for i in range(2 ** (n - 1)):
    ans = ''
    for j in range(n - 1):
        if bit[i][j] == 0:
            ans += 'a'
        else:
            ans += 'b'
    print('a' + ans)
