n = int(input())
words = ['a', 'b', 'c', 'd', 'e', 'f','g','h', 'i', 'j']
ans = [[] for _ in range(n)]
ans[0].append("a")
for i in range(n - 1):
    for ai in ans[i]:
        for j in range(i + 2):
            ans[i + 1].append(ai + words[j])
# print(ans[n - 1])
for a in ans[n - 1]:
    print(a)
