n = int(input())
n2 = (n**2) - 1
for i in range((2)**(n-1)):
    # print(i)
    ans = []
    s = list(str(format(i, '010b')))
    for i in s:
        if i == "0":
            ans.append("a")
        else:
            ans.append("b")
    
    s = ''.join([str(n) for n in ans[10-n:]])
    print(s)
