#!/usr/bin/env python3
N = int(input())
ans = ["a"] * N
for i in range(2**(N-1)):
    tmp = i
    memo = len(ans) - 1
    while tmp > 0:
        if tmp % 2 == 0:
            ans[memo] = "a"
        else:
            ans[memo] = "b"
        tmp //= 2
        memo -= 1
    print(''.join(ans))
