import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

al = ['a','b','c','d','e','f','g','h','i','j']

n = ni()

import numpy as np

for i in range(2**(n-1)):
  k = [0]+list(map(int,format(i, 'b')))
  p = np.cumsum(k)
  ans = [str(al[j]) for j in p]
  print(''.join(ans))