n = int(input())

if n >= 4:
    exit()
from itertools import product
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
for bits in product([0, 1], repeat=n):
    if bits[0] == 1:
        continue
    p = 0
    ansl = []
    for bit in bits:
        if bit == 1:
            p += 1
        ansl.append(ascii_lowercase[p])
    print("".join(ansl))
