import math
from heapq import heappush, heappop

N = int(input())
q = []

for i in range(1 << N):  
  s = ''.join('b' if i & (1 << x) else 'a' for x in range(N))
  heappush(q, s)
  
                 
for _ in range(math.ceil((1 << N) / 2)):
  s = heappop(q)
  print(s)