n = int(input())

w = ["a"]*n


ls = "abcdefghij"

for i in reversed(range(n)):
    for j in range(10):
        w[i] = ls[j]
        if w[i:]==ls[:n-i]:
            print(w)
            break
        else:
            print(w)