from itertools import combinations,combinations_with_replacement
S = ['a','b','c','d','e','f','g','h','i','j']
N = int(input())
X = [i for i in range(0,N)]
s = ['a']*N
if N == 1:
    print('a')
    exit()
print('a'*N)
for i in range(1,N):
    for e in combinations(X,i):
        index = 1
        if e[0] == 0:
            continue
        else:
            for e1 in e:
                s[e1] = S[index]
                index += 1
        print("".join(s))
        s = ['a']*N