s=['a']*10
n=int(input())
for i in range(2**(n-1)):
    print(''.join(s[-n:]))
    for j in range(n):
        if s[-j-1]=='a':
            s[-j-1]='b'
            break
        else:
            s[-j-1]='a'