N = int(input())

lst = []


def dfs(s, n):
    lst.append(s)
    if n == N:
        return
    else:
        return dfs(s + 'a', n + 1), dfs(s + 'b', n + 1)


dfs('a', 1)
for i in range(len(lst)):
    if len(lst[i]) == N:
        print(lst[i])