n = int(input())
ans = ['a']
for j in ans:
  if len(j) < n:
    c = ord(j[-1])
    #print(c)
    for i in range(97,c+2):
      l = str(j + chr(i))
      ans.append(l)
chk = []
for i in ans:
  if len(i) == n:
    chk.append(i)
for i in chk:
  print(i)