n = int(input())
import copy
for i in range(2**(n-1)):
    p = []
    s = copy.deepcopy(i)
    for j in range(n):
        if s&1 == 0:
            p.append('a')
        else:
            p.append('b')
        s >>= 1
    p.reverse()
    print(''.join(p))