k=["a","b","c","d","e","f","g","h","i","j"]
n=int(input())
list=[]
for j in range(n):
    list.append(k[j])
    for i in range(n):
        list[j]+=k[i]

xlist=list
for l in range(len(list)-1):
    xl=[str(c) for c in xlist[l]]

    if xl.count("a")==0:
        list.remove(list[l])
        
    else:
        for o in range(n-l):
            if xl.count(k[l])==0 and xl.count(k[l+o-1])!=1:
                
                list.remove(list[l])
list.sort()
for i in list:
    print(i)
 