def DFS(word,n):

    if len(word)==N:

        return print(word)

    else:

        for i in range(n+1):

            DFS(word+chr(97+i),n+1 if i==n else n)





N=int(input())

DFS("",0)

def DFS(word,N):

    if len(word)==n:

        return print(word)

    else:

        for i in range(N+1):

            DFS(word+chr(97+i),N+1 if i==N else N)





n=int(input())

DFS("",0)

def DFS(word, n):
    if len(word) == N:
        return print(word)
    else:
        for i in range(n + 1):
            DFS(word + chr(97 + i), n + 1 if i == n else n)


N = int(input())
DFS("", 0)

def DFS(word, N):
    if len(word) == n:
        return print(word)
    else:
        for i in range(N + 1):
            DFS(word + chr(97 + i), N + 1 if i == N else N)


n = int(input())
DFS("", 0)

-def DFS(word, n): -    if len(word) == N: +def DFS(word, N): +    if len(word) == n: -        for i in range(n + 1): -            DFS(word + chr(97 + i), n + 1 if i == n else n) +        for i in range(N + 1): +            DFS(word + chr(97 + i), N + 1 if i == N else N) -N = int(input()) +n = int(input())