N=int(input())
words=["a","b","c","d","e","f","g","h","i","j"]
list=[]
ans=""
def Division(n):
    if n == 0:
        return [ ]
    l = [ [ n ] ]
    for i in range(n - 1, 0, -1):
        for a in Division(n - i):
            if a[0] <= i:
                l.append([ i ] + a)
    return l

def AVE(A):
    if not len(A)==10:
        for i in range(0,10-len(A)):
            A.append(0)
    return A
Q=Division(N)
for i in range(0,len(Q)):
    ans=""
    for j in range(10):
        if ((AVE(Q[i]))[j])==0:
            pass
        else:
            ans+=words[j]*((AVE(Q[i]))[j])
            if len(ans)==N:
                list.append(ans)
list=sorted(list)
for i in  range(0,len(Q)):
    print(list[i])
