import sys
def input(): return sys.stdin.readline().rstrip()
from itertools import combinations
def main():
    n=int(input())
    lis_s=[]
    for kugiri in range(n):
        lis=list(combinations(range(1,n),kugiri))
        lis.sort(reverse=True) 
        for l in lis:
            s=""
            ss='a'
            for moji in range(n):
                if moji in l:
                    if ss=='a':ss='b'
                    else:ss='a'
                s+=ss
            lis_s.append(s)
    lis_s.sort()
    for ll in lis_s:
        print(ll)
    

if __name__=='__main__':
    main()