alpha = "abcdefghij"
N = int(input())
anss = []
for i in range(1, N+1):
    substr = alpha[:i]
    s = "a" * (N-i) + substr

    if i in [1, N]:
        anss.append(s)

    elif i == 2:
        last = s[-1]
        s = s[:-1]
        for i in reversed(range(1, N)):
            temp = s[:i] + last + s[i:]
            anss.append(temp)
    else:
        first = s[0]
        s = s[1:]
        for i in range(i-1, N):
            temp = s[:i] + first + s[i:]
            anss.append(temp)

for ans in anss:
    print(ans)
