n = int(input())

alp = [chr(v) for v in range(ord("a"), ord("z") + 1)]

def bitcount(v):
    cnt = 0
    for i in range(n):
        cnt += bool(v & (1 << i))
    return cnt

results = []
def f(i=0, j=0, s="", state=0):
    if i == n:
        if bitcount(state + 1) == 1:
            results.append(s)
        return
    for j in range(i + 1):
        f(i + 1, j, s + alp[j], state | (1 << j))
f()
print(*results, sep="\n")
