import itertools
A =[chr(ord('a') + i) for i in range(26)]
N = int(input())
for i in itertools.combinations_with_replacement(A[:N],N):
    if i[0] != "a":
        continue
    
    for j in range(1,N):
        if ord(i[j]) -ord(i[j-1])>1:
            break
        
    else:
        print(*i,sep="")
        


