n = int(input())
d = [[] for _ in range(10)]
d[0].append(1)
mx = 2
for i in range(1, n):
    prev = d[i-1]
    for j in range(mx):
        for ip in prev:
            sip = str(ip)
            aip = str(ip) + str(j+1)
            d[i].append(int(aip))
alpa = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
for idx in d[n-1]:
    tg = list(str(idx))
    l_ans = [alpa[int(i)-1] for i in tg]
    ans = ""
    for l in l_ans:
        ans += l
    print(ans)