import itertools
import sys
s = ["a","b","c","d","e","f","g","h","i"]
n=int(input())
l = ["a"]

x = 1
while(x <= n):
    ll = l
    l = []
    for i in ll:
        for j in s[:x-1]:
            l.append(i + j)
    l.append("".join(s[:x]))
    x = x + 1
print(l)