from copy import deepcopy
def main():
    N = int( input())
    if N == 1:
        print('a')
        return
    ANS = ['a']
    for _ in range(N-1):
        G = deepcopy(ANS)
        ANS = []
        for t in G:
            ANS.append(t+'a')
            ANS.append(t+'b')
    print('\n'.join(ANS))
if __name__ == '__main__':
    main()
