N = int(input())
A = ['a','b','c','d','e','f','g','h','i','j']
L = A[0:N]
for p in range(1):
    if N == 1:
        print(A[p])
    for q in range(2):
        if N == 2:
            print(A[p] + A[q])
        for r in range(3):
            if N == 3:
                print(A[p] + A[q] + A[r])
            for s in range(4):
                if N == 4:
                    print(A[p] + A[q] + A[r] + A[s])
                for t in range(5):
                    if N == 5:
                        print(A[p] + A[q] + A[r] + A[s] + A[t])
                    for u in range(6):
                        if N == 6:
                            print(A[p] + A[q] + A[r] + A[s] + A[t] + A[u])
                        for v in range(7):
                            if N == 7:
                                print(A[p] + A[q] + A[r] + A[s] + A[t] + A[u] + A[v])
                            for w in range(8):
                                if N == 8:
                                    print(A[p] + A[q] + A[r] + A[s] + A[t] + A[u] + A[v] + A[w])
                                for x in range(9):
                                    if N == 9:
                                        print(A[p] + A[q] + A[r] + A[s] + A[t] + A[u] + A[v] + A[w] + A[x])
                                    for y in range(10):
                                        if N == 10:
                                            print(A[p] + A[q] + A[r] + A[s] + A[t] + A[u] + A[v] + A[w] + A[x] + A[y])