import sys
import math  # noqa
import bisect  # noqa
import queue  # noqa


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())

    que = queue.Queue()
    que.put('a')

    while not que.empty():
        res = que.get()
        if len(res) < N:
            c = res[-1]
            for i in range(ord('a'), ord(c) + 2):
                que.put(res + chr(i))
        elif len(res) == N:
            print(res)
        else:
            break


if __name__ == '__main__':
    main()
