n=int(input())
for i in range(2**(n-1)):
  S=format(i,'10b')
  A=[1]
  for i in range(n-1):
    if S[-n+i+1]=="1":
      A.append(A[-1]+1)
    else:
      A.append(A[-1])
  for i in range(n):
    print(chr(A[i]+96),end="")
  print()