
n = int(input())
L = []
def f(sa, n, b):
    # sa='a', n=9, b='b'
#    print(sa, n, b)
    if n == 0:
        L.append(sa)
        return
    for i in range(n, 0, -1):
        x = sa + b*i
        c = chr(ord(b) + 1)
        f(x, n-i, c)
i = f('', n, 'a')
for l in L:
    print(l)
