from itertools import product
from collections import deque

N = int(input())
d = deque(["b","c","d","e","f","g","h","i","j","k"])
l = ["a", "x"]

for s in list(product(l,repeat=N-1)):
  tmp = list(s)
  for i in range(len(tmp)):
    if tmp[i] == "x":
      tmp[i] = d.popleft()
  print("a"+"".join(tmp))
  d = deque(["b","c","d","e","f","g","h","i","j","k"])