# coding: utf-8
# Your code here!
N=int(input())

cand=["a"]

for i in range(N-1):
    temp=[]
    for item in cand:
        temp.append(item+item[-1])
        temp.append(item+chr(ord(item[-1])+1))
    cand=temp[:]

for item in cand:
    print(item)