import itertools

n = int(input())
l = ['a', 'b', 'c', 'd','e','f','g','h','i','j']

if n == 1:
    print("a")

if n == 2:
    print("aa")
    print("ab")
    
if n >= 3:
    for v in itertools.product(l[:n - 1], repeat = n-1):
        if v[0] != l[n -2]:
            print("a" + "".join(v))
        else:
            break
    print("".join(l[:n]))