N = int(input())
for i in range(1 << (N - 1)):
    xs = [0] * N
    for j in range(N - 1):
        if (1 << (N - 2 - j)) & i:
            xs[j + 1] = xs[j] + 1
        else:
            xs[j + 1] = xs[j]
    print(''.join('abcdefghij'[x] for x in xs))