import sys
sys.setrecursionlimit(10 ** 7)


N = int(input())
L = list("abcdefghij")

def nasu(x, n, e):
  if n == N:
    print(x)
    return
  for i in range(e + 1):
    if i == n:
      nasu(x + L[i], n + 1, e + 1)
    else:
      nasu(x + L[i], n + 1, e)

nasu("", 0, 0)