N = int(input().rstrip())
zumi = []
for i in range(1, N + 1):
    ret = 'a' * i + 'b' * (N - i)
    # print(f'origin: {ret}')
    for j in range(i, N + 1):
        # print(f'1: {ret[:j-1]}, 2: {ret[j:]}')
        tmp = ret[:j - 1] + 'a' + ret[j:]
        if tmp not in zumi:
            zumi.append(tmp)
for x in sorted(zumi):
    print(x)
