import sys
n=int(input())
if n==1:
  print('a')
  sys.exit()
abc=list('abcdefghijklmnopqrstuvwxyz')
ans=[]
for i in range(2**(n-1)):
  f=list(bin(i)[2:].zfill(n-1))
  k=0
  tmp=abc[k]
  for j in f:
    if j=='1':
      k+=1
    tmp+=abc[k]
  ans+=[tmp]
ans=sorted(ans)
for i in ans:
  print(i)