N = int(input())

print('a'*N)

for a in range(N, 0, -1):
    for b in range(N-a, 0 ,-1):
        for c in range(N-a-b, 0 ,-1):
            for d in range(N-a-b-c, 0 ,-1):
                for e in range(N-a-b-c-d, 0 ,-1):
                    for f in range(N-a-b-c-d-e, 0 ,-1):
                        for g in range(N-a-b-c-d-e-f, 0 ,-1):
                            for h in range(N-a-b-c-d-e-f-g, 0 ,-1):
                                for i in range(N-a-b-c-d-e-f-g-h, 0 ,-1):
                                    for j in range(N-a-b-c-d-e-f-g-h-i, 0 ,-1):
                                        print('a'*a+'b'*(b)+'c'*c+'d'*d+'e'*e+'f'*f+'g'*g+'h'*h*'i'*i+j*(N-a-b-c-d-e-f-g-h-i))