import sys
import copy
readline = sys.stdin.buffer.readline

n = int(readline())

kijun = ord("a")

ans = [kijun]*n
print("a"*n)
for i in range(n-1):
    kijun += 1
    for j in range(n-1-i):
        ans[j] = kijun
        res = copy.deepcopy(ans)
        res.reverse()
        for i in range(len(res)):
            res[i] = chr(res[i])
        print("".join(res))