import copy
N = int(input())

L = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]

ans = []

def f(List):
    if sum(List) == N:
        List.sort(reverse=True)
        s = ""
        for i in range(10):
            s += L[i]*List[i]
        ans.append(s)
    for i in range(9):
        if List[i+1] == 0:
            n = List[i]
            idx = i+1
            break
    for i in range(1, min(n, N-sum(List))+1):
        List2 = copy.copy(List)
        List2[idx] = i
        f(List2)

for i in range(1, N+1):
    List = [0]*10
    List[0] = i
    f(List)

ans.sort()
for a in ans:
    print(a)