import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

alphabets = [chr(ord('a') + x) for x in range(26)]

def dfs(S, i):
    if len(S) == N:
        return ''.join(S)
    for j in range(i):
        for w in dfs(S + [alphabets[j]], i):
            return w
    for w in dfs(S + [alphabets[i]], i + 1):
        return w

for w in dfs([],0):
    print(w)
