from math import factorial
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def comb(n, r):
    return factorial(n) // (factorial(r) * factorial(n - r))


def main():
    N = int(readline())
    S = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
    d = {}
    for i, s in enumerate(S):
        d[i] = s

    for i in range(2**(N-1)):
        c = 0
        tmp = ""
        for j in range(N-1,-1,-1):
            if i & (1 << j):
                c += 1
            tmp += d[c]
        print(tmp)
            

if __name__ == "__main__":
    main()
