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

N = int(input())
S = [0]*N
T = [2]*N

def up(i):
    if i == 0:
        return True
    S[i] += 1
    if S[i] == T[i]:
        S[i] = 0
        if T[i] < N:
            T[i] += 1
        return up(i-1)
    return False

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