import itertools

def resolve():
    n = int(input())
    l = ['a', 'b']

    exceptstr = 'bbbbbbbbbb'
    exceptstr = exceptstr[:n]
    for v in itertools.combinations_with_replacement(l, n):
        str = ''.join(v)
        if str != exceptstr:
            print(str)
            
resolve()