import collections


def main():
    n = int(input())
    # if n == 1:
    #     print("a")
    # for i in range(2**(n-1)):
    #     bin_str = "0" + format(i, f'0{n-1}b')
    #     print(bin_str.replace("0", "a").replace("1", "b"))

    ret = [[] for _ in range(10)]
    ret[0] = ["a"]

    alp = "abcdefghijklmnopqrstuvwxyz"

    if n == 1:
        print(ret[n-1])
        return

    ind = 1
    while ind < n:
        tmp_len = len(ret[ind-1])
        for j, _r in enumerate(ret[ind-1]):
            alphabet_num = len(collections.Counter(_r))
            for k in range(alphabet_num+1):
                ret[ind].append(_r+alp[k])
        ind += 1

    print(ret[n-1])
    return


if __name__ == '__main__':
    main()
