N = int(input())

ans_check = set()
ans = list()
for i in range(2**N):
    n = i
    s = ""
    sr = ""
    for j in range(N):
        s = s + ("a" if n % 2 == 0 else "b")
        sr = sr + ("b" if n % 2 == 0 else "a")
        n >>= 1
    if sr < s:
        s, sr = sr, s
    if sr in ans_check or s in ans_check:
        continue
    else:
        ans_check.add(s)
        ans.append(s)

ans.sort()
for a in ans:
    print(a)
