def d_string_equivalence():
    from itertools import product
    N = int(input())

    ans = ['a' + ''.join(s) for s in product('ab', repeat=N - 1)]
    return '\n'.join(ans)

print(d_string_equivalence())