n = int(input())
#lis = ['a',b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
ans = []
#for i in range(n):
t = ['a'] * n

ans.append(''.join(t))
for j in range(1,n):
    t = ['a'] * n
    t[j] = 'b'
    ans.append(''.join(t))
ans.sort()
for i in range(len(ans)):
    print(ans[i])