output_description: Print n+1 lines. The k-th line should contain the number of the different
  subsequences of the given sequence with length k, modulo 10^9+7.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      n
      a_1 a_2 ... a_{n+1}
attempt: # -*- coding: utf-8 -*-
  
  import sys
  from collections import Counter
  
  
  def input():
      return sys.stdin.readline().strip()
  
  
  def list2d(a, b, c):
      return [[c] * b for i in range(a)]
  
  
  def list3d(a, b, c, d):
      return [[[d] * c for j in range(b)] for i in range(a)]
  
  
  def list4d(a, b, c, d, e):
      return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
  
  
  def ceil(x, y=1):
      return int(-(-x // y))
  
  
  def INT():
      return int(input())
  
  
  def MAP():
      return map(int, input().split())
  
  
  def LIST(N=None):
      return list(MAP()) if N is None else [INT() for i in range(N)]
  
  
  def Yes():
      print("Yes")
  
  
  def No():
      print("No")
  
  
  def YES():
      print("YES")
  
  
  def NO():
      print("NO")
  
  
  sys.setrecursionlimit(10**9)
  INF = float("inf")
  MOD = 10**9 + 7
  
  
  class FactInvMOD:
      """階乗たくさん使う時用のテーブル準備"""
  
      def __init__(self, MAX, MOD):
          """MAX：階乗に使う数値の最大以上まで作る"""
  
          MAX += 1
          self.MAX = MAX
          self.MOD = MOD
          # 階乗テーブル
          factorial = [1] * MAX
          factorial[0] = factorial[1] = 1
          for i in range(2, MAX):
              factorial[i] = factorial[i - 1] * i % MOD
          # 階乗の逆元テーブル
          inverse = [1] * MAX
          # powに第三引数入れると冪乗のmod付計算を高速にやってくれる
          inverse[MAX - 1] = pow(factorial[MAX - 1], MOD - 2, MOD)
          for i in range(MAX - 2, 0, -1):
              # 最後から戻っていくこのループならMAX回powするより処理が速い
              inverse[i] = inverse[i + 1] * (i + 1) % MOD
          self.fact = factorial
          self.inv = inverse
  
      def nCr(self, n, r):
          """組み合わせの数 (必要な階乗と逆元のテーブルを事前に作っておく)"""
  
          if n < r:
              return 0
          # 10C7 = 10C3
          r = min(r, n - r)
          # 分子の計算
          numerator = self.fact[n]
          # 分母の計算
          denominator = self.inv[r] * self.inv[n - r] % self.MOD
          return numerator * denominator % self.MOD
  
      def nPr(self, n, r):
          """順列"""
  
          if n < r:
              return 0
          return self.fact[n] * self.inv[n - r] % self.MOD
  
      def nHr(self, n, r):
          """重複組み合わせ"""
  
          # r個選ぶところにN-1個の仕切りを入れる
          return self.nCr(r + n - 1, r)
  
  
  N = INT()
  A = LIST()
  
  # 唯一2つある値を見つける
  target = 0
  for k, v in Counter(A).items():
      if v == 2:
          target = k
          break
  idx = A.index(target)
  # 2つある値の1回目と2回目の出現位置の間にいくつ数があるか
  btw = A[idx + 1 :].index(target)
  
  fim = FactInvMOD(N + 1, MOD)
  for i in range(1, N + 2):
      # 部分列の総数 - 重複分
      ans = fim.nCr(N + 1, i) - fim.nCr(N - 1 - btw, i - 1)
      print(ans % MOD)
  
problem_description: Statement
  
  You are given an integer sequence of length n+1, a_1,a_2,...,a_{n+1}, which
  consists of the n integers 1,...,n. It is known that each of the n integers
  1,...,n appears at least once in this sequence.
  
  For each integer k=1,...,n+1, find the number of the different subsequences
  (not necessarily contiguous) of the given sequence with length k, modulo
  10^9+7.
samples: [{"input": "3\n    1 2 1 3", "output": "3\n    5\n    4\n    1\n    \n\nThere are three subsequences with length 1: 1 and 2 and 3.\n\nThere are five subsequences with length 2: 1,1 and 1,2 and 1,3 and 2,1 and\n2,3.\n\nThere are four subsequences with length 3: 1,1,3 and 1,2,1 and 1,2,3 and\n2,1,3.\n\nThere is one subsequence with length 4: 1,2,1,3.\n\n* * *"}, {"input": "1\n    1 1", "output": "1\n    1\n    \n\nThere is one subsequence with length 1: 1.\n\nThere is one subsequence with length 2: 1,1.\n\n* * *"}, {"input": "32\n    29 19 7 10 26 32 27 4 11 20 2 8 16 23 5 14 6 12 17 22 18 30 28 24 15 1 25 3 13 21 19 31 9", "output": "32\n    525\n    5453\n    40919\n    237336\n    1107568\n    4272048\n    13884156\n    38567100\n    92561040\n    193536720\n    354817320\n    573166440\n    818809200\n    37158313\n    166803103\n    166803103\n    37158313\n    818809200\n    573166440\n    354817320\n    193536720\n    92561040\n    38567100\n    13884156\n    4272048\n    1107568\n    237336\n    40920\n    5456\n    528\n    33\n    1\n    \n\nBe sure to print the numbers modulo 10^9+7."}]