# -*- coding: utf-8 -*-

alphabets = list('abcdefghijklmnopqrstuvwxyz')

N = int(input())

if N == 1:
    print('a')
else:
    str_tmp = ['a']
    str_final = []
    for i in range(1, N):
        for s in str_tmp:
            for alphabet in set(list(s)):
                str_final.append(s+alphabet)
            str_final.append(s+alphabets[len(set(list(s)))])
    print(str_final)


