N = int(input())

ans = set()
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:
        continue
    else:
        ans.add(s)

for a in ans:
    print(a)
