n=int(input())
l = ['a','b','c','d','e','f','g','h','i','j','k','l']
arr = ['a']
for i in range(2,n+1):
    temp = []
    for x in l[:i]:
        for y in arr:
            temp.append(y+x)
    arr = temp
arr.sort()
for x in arr:
    print(x)