import sys

N=int(input())
def num2alpha(num):
    return chr(97+num)
  
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
def Base_n_to_10(X,n):
    out = 0
    for i in range(1,len(str(X))+1):
        out += int(X[-i])*(n**(i-1))
    return out
print(''.join(['a']*N))
for i in range(N-1):
  a=['0']*N
  while True:
    temp=Base_10_to_n(Base_n_to_10(''.join(a),5)+1,N).zfill(N)
    a=[i for i in temp]
    print(''.join([num2alpha(int(i)) for i in a]))   
    #sys.exit()
    b=True
    for j in range(N-i-1):
      if a[N-i-1]>a[j]:
        b=False
        break
    if not b:
      break
