N = int(input())

words = [chr(ord('a')+i) for i in range(10)]
dp = ['']
for i in range(1, N+1):
    ndp = []
    for w in dp:
        for k in range(i):
            ndp.append(w+words[k])
    dp = ndp
for l in dp:
    print(l)