n=int(input())
ag='aaaaaaaaaa'
ainit=ag[0:n]
alist=[]
alpha=['a','b','c','d','e','f','g','h','i','j']
if n==1:
    print(ainit)
else:
    print(ainit)
    ainit2=ainit[0:n-1]+'b'
    print(ainit2)
    alist.append(ainit2)
    for i in range(n-2):
        alistc=alist
        alist=[]
        for j in range(len(alistc)):
            s=alistc[j][1:n]
            #print(s)
            for k in range(i+2):
                sout=s+alpha[k]
                print(sout)
                alist.append(sout)
            