def f(n,k):
    x = chr(k)
    if n==1:
        return [chr(k)]
    if n==2:
        return [x+x,x+chr(k+1)]
    A = [x*n]
    for i in range(1,n):
        y = x*i+chr(k+1)+x*(n-i-1)
        A.append(y)
    B = f(n-1,k+1)
    for b in B:
        y = x+b
        A.append(y)
    return A
N = int(input())
A = f(N,97)
A = sorted(A)
for a in A:
    print(a)