n=int(input())
alph=[a,b,c,d,e,f,g,h,i,j]
ans=[[""]*n]
ans[0]=["a"]
for i in range(n-1):
  for j in range(i+1):
	  for stri in ans[j-1]:
    	  ans[j].append(stri+alph[j])
 #squreen
print(*ans[n-1],sep='/n')

                       