n = int(input())
dp = [[] for _ in range(12)]
dp[1].append("a")
alphabet = "abcdefghijklmno"

for i in range(1, n):
    for r in dp[i]:
        for t in alphabet[:i+1]:
            dp[i+1].append(r+t)


for ans in dp[n]:
    print(ans)