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: MOD = 10**9 + 7
  
  
  class Fp(int):
      def __new__(self, x=0):
          return super().__new__(self, x % MOD)
  
      def inv(self):
          return self.__class__(super().__pow__(MOD - 2, MOD))
  
      def __add__(self, value):
          return self.__class__(super().__add__(value))
  
      def __sub__(self, value):
          return self.__class__(super().__sub__(value))
  
      def __mul__(self, value):
          return self.__class__(super().__mul__(value))
  
      def __floordiv__(self, value):
          return self.__class__(self * self.__class__(value).inv())
  
      def __pow__(self, value):
          return self.__class__(super().__pow__(value % (MOD - 1), MOD))
  
      __radd__ = __add__
      __rmul__ = __mul__
  
      def __rsub__(self, value):
          return self.__class__(-super().__sub__(value))
  
      def __rfloordiv__(self, value):
          return self.__class__(self.inv() * value)
  
      def __iadd__(self, value):
          self = self + value
          return self
  
      def __isub__(self, value):
          self = self - value
          return self
  
      def __imul__(self, value):
          self = self * value
          return self
  
      def __ifloordiv__(self, value):
          self = self // value
          return self
  
      def __ipow__(self, value):
          self = self**value
          return self
  
      def __neg__(self):
          return self.__class__(super().__neg__())
  
  
  class Combination:
      def __init__(self, max_n):
          self.max_n = 0
          self.fact = [Fp(1)]
          self.ifact = [Fp(1)]
          self.make_fact_list(max_n)
  
      def C(self, n, k):
          return self.fact[n] * self.ifact[k] * self.ifact[n - k] if 0 <= k <= n else 0
  
      def H(self, n, k):
          return self.C(n + k - 1, k) if n or k else 1
  
      def P(self, n, k):
          return self.fact[n] * self.ifact[n - k] if 0 <= k <= n else 0
  
      def make_fact_list(self, max_n):
          if max_n <= self.max_n:
              return
          self.fact += [Fp(0)] * (max_n - self.max_n)
          self.ifact += [Fp(0)] * (max_n - self.max_n)
          for i in range(self.max_n + 1, max_n + 1):
              self.fact[i] = self.fact[i - 1] * i
              self.ifact[i] = self.ifact[i - 1] // i
          self.max_n = max_n
  
  
  N = int(input())
  A = list(map(int, input().split()))
  B = [-1] * (N + 1)
  for i, a in enumerate(A):
      if B[a] >= 0:
          break
      B[a] = i
  
  L = B[a]
  R = N - i
  M = i - B[a] - 2
  print(N)
  comb = Combination(N + 1)
  for k in range(2, N + 2):
      print(comb.C(N + 1, k) - comb.C(L + R, k - 1))
  
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."}]