from itertools import combinations
N = int(input())

ans = [[] for i in range(2**(N-1))]
for i in range(N): #桁
    one_set = 2**(N-1-i)
    counter = 0
    for _ in range(len(ans)//one_set):
        second = _%2
        for j in range(one_set):
            if not ans[counter]:
                ans[counter].append(0)
            else:
                ans[counter].append(ans[counter][-1]+int(second))
            counter += 1
def repqqq(array):
    alpha = "abcdefghijklmn"
    temp = []
    for a in array:
        temp.append(alpha[a])
    return "".join(temp)
ans = [repqqq(line) for line in ans]
for a in ans:
    print(a)
