S = "abcdefghijklmn"


def main():

    N = int(input())

    if N == 1:
        for i in range(1):
            print(S[i])

    elif N == 2:
        for i in range(1):
            for j in range(i + 2):
                print(S[i] + S[j])

    elif N == 3:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    print(S[i] + S[j] + S[k])

    elif N == 4:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        print(S[i] + S[j] + S[k] + S[l])

    elif N == 5:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            print(S[i] + S[j] + S[k] + S[l] + S[m])

    elif N == 6:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            for n in range(m + 2):
                                print(S[i] + S[j] + S[k] + S[l] + S[m] + S[n])

    elif N == 7:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            for n in range(m + 2):
                                for o in range(n + 2):
                                    print(S[i] + S[j] + S[k] + S[l] + S[m] +
                                          S[n] + S[o])

    elif N == 8:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            for n in range(m + 2):
                                for o in range(n + 2):
                                    for p in range(o + 2):
                                        print(S[i] + S[j] + S[k] + S[l] +
                                              S[m] + S[n] + S[o] + S[p])

    elif N == 9:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            for n in range(m + 2):
                                for o in range(n + 2):
                                    for p in range(o + 2):
                                        for q in range(p + 2):
                                            print(S[i] + S[j] + S[k] + S[l] +
                                                  S[m] + S[n] + S[o] + S[p] +
                                                  S[q])

    elif N == 10:
        for i in range(1):
            for j in range(i + 2):
                for k in range(j + 2):
                    for l in range(k + 2):
                        for m in range(l + 2):
                            for n in range(m + 2):
                                for o in range(n + 2):
                                    for p in range(o + 2):
                                        for q in range(p + 2):
                                            for r in range(q + 2):
                                                print(S[i] + S[j] + S[k] +
                                                      S[l] + S[m] + S[n] +
                                                      S[o] + S[p] + S[q] +
                                                      S[r])


main()
