import sys
stdin = sys.stdin
from itertools import product
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))


n = ni()

for switch in product([0, 1], repeat=n-1):
    a = ord("a")
    #print(switch)
    print("a", end="")
    for i in switch:
        if i == 0:
            print(chr(a), end="")
        else:
            print(chr(a+1), end="")
            a += 1
    print("")