from itertools import permutations
from itertools import product

N=int(input())

st=["a","b","c","d","e","f","g","h","i","j"]

num=[i for i in range(2,10)]

st=st[:N]

st2=[""]

ans_ls=["b","c","d","e","f","g","h","i","j"]
ans=["x"]*N

ind=0

if N==1:
    print("a")
else:
    print("a"*N)
    for i in range(2,len(st)):
        for num_ls in product(num_ls,i):
            for j in num_ls:
                ans[j]="a"
            for _ in range(len(ans)):
                if ans[j]!="a":
                    ans[ind]=st2[ind]
                    ind+=1
            print(ans)

  
    print("".join(st))






    

