i = int(input())
p = print
jlist = [None] * 20
def jjj(i):
    if jlist[i-1] is not None:
        return jlist[i-1]
    if i == 1:
        return ('a')
    u = []
    # u = list(map(lambda x: 'a'+x), jjj(i-1))
    for k in range(i-1):
        u+= list(map(lambda x: 'a'+slide(x, k), jjj(i-1)))
    jlist[i-1] = u
    return u
        

def slide(s, k):
    ss = ''
    for c in s:
        cc = ord(c) + k
        ss += chr(cc)
    return ss

p('\n'.join(jjj(i)))

