n = int(input())
pw = ['a', 'b', 'c']
ans = ['' for _ in range(n)]
# print(ord('b'))
def dfs(i):
    if i == n:
        print(''.join(ans))
        return
    for j in range(97, 100):
        # print(j)
        ans[i] = chr(j)
        dfs(i+1)

dfs(0)