output_description: Assume that there are K strings of length N that are in normal form: w_1,
  \ldots, w_K in lexicographical order. Output should be in the following
  format:
  
      
      
      w_1
      :
      w_K
      
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: # coding:utf-8
  
  n = int(input())  # 1 <= n <= 10
  
  lis = [0 for i in range(n)]
  last = 0
  now = 0
  now_s = ""
  a_list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
  
  
  def converter(x, a, n):
      # a進数からn進数への変換
      t = 0
      out = 0
      y = -1
      while not x == 0:
          y = x % n
          out += y * (a**t)
          x = (x - y) / n
          t += 1
      return int(out)
  
  
  for i in range(n):
      last += i * (10 ** (n - i - 1))
  
  last = converter(last, n, 10) + 1
  
  while not now == last:
      now = converter(now, 10, n)
      d = now
      now_s = ""
      for i in range(n):
          c = d // (10 ** (n - i - 1))
          now_s += a_list[c]
          d -= c * (10 ** (n - i - 1))
      print(now_s)
      now = converter(now, n, 10)
      now += 1
  
problem_description: Statement
  
  In this problem, we only consider strings consisting of lowercase English
  letters.
  
  Strings s and t are said to be **isomorphic** when the following conditions
  are satisfied:
  
    * |s| = |t| holds.
    * For every pair i, j, one of the following holds:
      * s_i = s_j and t_i = t_j.
      * s_i \neq s_j and t_i \neq t_j.
  
  For example, `abcac` and `zyxzx` are isomorphic, while `abcac` and `ppppp` are
  not.
  
  A string s is said to be in **normal form** when the following condition is
  satisfied:
  
    * For every string t that is isomorphic to s, s \leq t holds. Here \leq denotes lexicographic comparison.
  
  For example, `abcac` is in normal form, but `zyxzx` is not since it is
  isomorphic to `abcac`, which is lexicographically smaller than `zyxzx`.
  
  You are given an integer N. Print all strings of length N that are in normal
  form, in lexicographically ascending order.
samples: [{"input": "1", "output": "a\n    \n\n* * *"}, {"input": "2", "output": "aa\n    ab"}]