import sys
import math
from itertools import combinations_with_replacement 
#sys.stdin=open("input.in","r")
#sys.stdout=open("output.out","w")
n=int(input())
st=["a","b"]
comb = combinations_with_replacement([0, 1,0,1,0,1,0,1,0,1], n)  
comb2=[]
comb=set(comb)
comb=sorted(comb)
for i in range(len(comb)-2):
    st=""
    for j in comb[i]:
        if j==1:
            st+="b"
        else:
            st+="a"
    print(st)
"""for i in list(comb): 
    l=list(i)
    comb2.append(l.copy())
    for j in range(len(l)):
        if l[j]==1:
            l[j]=0
        else:
            l[j]=1
    comb2.append(l)
comb2=sorted(comb2)
for i in comb2:
    l=i
    for j in range(len(l)):
        if l[j]==1:
            l[j]="b"
        else:
            l[j]="a"
    print(l)"""
