#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n = int(input())
ans = []
for i in range(2 ** (n-1)):
    val = 0
    s = [val]
    for j in range(n-1):
        if i & 1 << j:
            val += 1
        s.append(val)
    ans.append(s)

orda = ord("a")
for line in ans:
    print("".join([chr(item + orda) for item in line]))