def p(S):

    str = ""

    for s in S:

        str += chr(ord("a")+int(s))

    print(str)



N = int(eval(input()))

S = [0]*N



def up(i):

    if i == 0:

        return True

    S[i] += 1

    if S[i] == max(S[:i]) + 2:

        S[i] = 0

        return up(i-1)

    return False



while True:

    p(S)

    if up(N-1):

        break

N = int(eval(input()))



def dfs(s, mx):

    if len(s) == N:

        print(s)

    else:

        for c in range(ord("a"),mx+1):

            if c == mx:

                dfs(s+chr(c),mx+1)

            else:

                dfs(s+chr(c),mx)



dfs("",ord("a"))

def p(S):
    str = ""
    for s in S:
        str += chr(ord("a") + int(s))
    print(str)


N = int(eval(input()))
S = [0] * N


def up(i):
    if i == 0:
        return True
    S[i] += 1
    if S[i] == max(S[:i]) + 2:
        S[i] = 0
        return up(i - 1)
    return False


while True:
    p(S)
    if up(N - 1):
        break

N = int(eval(input()))


def dfs(s, mx):
    if len(s) == N:
        print(s)
    else:
        for c in range(ord("a"), mx + 1):
            if c == mx:
                dfs(s + chr(c), mx + 1)
            else:
                dfs(s + chr(c), mx)


dfs("", ord("a"))

-def p(S): -    str = "" -    for s in S: -        str += chr(ord("a") + int(s)) -    print(str) +N = int(eval(input())) -N = int(eval(input())) -S = [0] * N +def dfs(s, mx): +    if len(s) == N: +        print(s) +    else: +        for c in range(ord("a"), mx + 1): +            if c == mx: +                dfs(s + chr(c), mx + 1) +            else: +                dfs(s + chr(c), mx) -def up(i): -    if i == 0: -        return True -    S[i] += 1 -    if S[i] == max(S[:i]) + 2: -        S[i] = 0 -        return up(i - 1) -    return False - - -while True: -    p(S) -    if up(N - 1): -        break +dfs("", ord("a"))