n = int(input())
ans = [[] for _ in range(2**(n-1))]

ans[0].append([1])
ans[1].append([1,1])
ans[1].append([1,2])
#ans[2].append([1,1,1])
#ans[2].append([1,1,2])
#ans[2].append([1,2,2])
#ans[2].append([1,2,3])
import numpy as np

for i in range(2, n):
    for j in range(2):
        for ai in ans[i-1]:
            x = np.array(ai)
            y = list(x+j)
            ans[i].append([1] + y)

r = ['a','b','c','d','e','f','g','h','i','j','k']
for ai in ans[n-1]:
    print(''.join(map(lambda x: str(r[x-1]), ai)))


