n = int(input())

strings = ["a"]

for i in range(n-1):
    newstrings = []
    for s in strings:
        mx = ord('a')
        for char in s:
            mx = max(mx, ord(char))
        
        for c in range(ord('a'),mx+2):
            newstrings.append(s+chr(c))
    
    strings = newstrings

print(strings)