def gen_pattern(N, pre=b""):
  for c in range(0x61, max(pre or 0x60)+2):
    pat = pre+c
    if len(pat) == N:
      yield pat.decode()
    else:
      yield from gen_pattern(N, pat)

for pattern in gen_pattern(int(input())):
  print(pattern)
