N = int(input())

#from collections import deque

#Q = deque()

S = "a"

def printer(S):
    if len(S)==N:
        print(S)
    else:
        printer(S + S[-1])
        printer(S + chr(ord(S[-1])+1))

printer(S)