def main():
    N = int(input())
    abc = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')
    past = [[0, 'a']]

    if N == 1:
        print('a')
    else:
        for i in range(1, N):
            ns = []
            for s in past:
                for j in range(s[0] + 2):
                    ns.append([j, s[1] + abc[j]])
            past = ns
            if i == N - 1:
                for s in sorted(past, key=lambda x:x[1]):
                    print(s[1])


if __name__ == '__main__':
    main()
