You are given an integer sequence of length n+1, a_1, a_2, ..., a_{n+1}, consisting of n integers 1,...,n. 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 different subsequences (not necessarily contiguous) of the given sequence with length k, modulo 10^9+7. If the contents of two subsequences are the same, they are not separately counted even if they originate from different positions in the original sequence. A subsequence of a sequence a with length k is a sequence obtained by selecting k of the elements of a and arranging them without changing their relative order. The input is given in the format: n a_1 a_2 ... a_{n+1}. Print n+1 lines. The k-th line should contain the number of different subsequences of the given sequence with length k, modulo 10^9+7.

# Buggy version:
def cmb(n,k):
    if n < k:
        return 0
    return fac[n]*inv_fac[n-k]*inv_fac[k] % mod
fac = [1]
mod = 10**9+7
n = int(input())
a = list(map(int,input().split()))
for i in range(1,n+2):
    fac.append(fac[-1]*i % mod)
inv_fac = [pow(fac[n+1],mod-2,mod)]
for i in range(1,n+2)[::-1]:
    inv_fac.append(inv_fac[-1]*i % mod)
inv_fac = inv_fac[::-1]
s = set()
num = -1
for i in range(n+1):
    if a[i] in s:
        idx = i
        break
    s.add(a[i])

for i in range(1,n+2):
    ans = cmb(n+1,i)
    ans -= cmb(n-idx,i-1)
    ans %= mod
    print(ans)

# Fixed version:
def cmb(n,k):
    if n < k:
        return 0
    return fac[n]*inv_fac[n-k]*inv_fac[k] % mod
fac = [1]
mod = 10**9+7
n = int(input())
a = list(map(int,input().split()))
for i in range(1,n+2):
    fac.append(fac[-1]*i % mod)
inv_fac = [pow(fac[n+1],mod-2,mod)]
for i in range(1,n+2)[::-1]:
    inv_fac.append(inv_fac[-1]*i % mod)
inv_fac = inv_fac[::-1]
s = set()
num = -1
for i in range(n+1):
    if a[i] in s:
        idx2 = i
        num = a[i]
        break
    s.add(a[i])
for i in range(n+1):
    if a[i] == num:
        idx1 = i
        break
for i in range(1,n+2):
    ans = cmb(n+1,i)
    ans -= cmb(n+idx1-idx2,i-1)
    ans %= mod
    print(ans)

# Buggy version:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7
class nCr():
    def __init__(self, n):
        self.n = n
        self.fa = [1] * (self.n + 1)
        self.fi = [1] * (self.n + 1)
        for i in range(1, self.n + 1):
            self.fa[i] = self.fa[i - 1] * i % mod
            self.fi[i] = pow(self.fa[i], mod - 2, mod)
    def comb(self, n, r):
        if n < r:return 0
        if n < 0 or r < 0:return 0
        return self.fa[n] * self.fi[r] % mod * self.fi[n - r] % mod
comb = nCr(2 * n)
c = Counter(a)
num = c.most_common()[0][0]
l, r = a.index(num) + 1, n - list(reversed(a)).index(num) + 1
print(l, r)
for i in range(1, n + 2):
    print(comb.comb(n + 1, i) - comb.comb(n - (r - l) - 1, i - 1))

# Fixed version:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7
class nCr():
    def __init__(self, n):
        self.n = n
        self.fa = [1] * (self.n + 1)
        self.fi = [1] * (self.n + 1)
        for i in range(1, self.n + 1):
            self.fa[i] = self.fa[i - 1] * i % mod
            self.fi[i] = pow(self.fa[i], mod - 2, mod)
    def comb(self, n, r):
        if n < r:return 0
        if n < 0 or r < 0:return 0
        return self.fa[n] * self.fi[r] % mod * self.fi[n - r] % mod
comb = nCr(2 * n)
c = Counter(a)
num = c.most_common()[0][0]
l, r = a.index(num), n - list(reversed(a)).index(num)
for i in range(1, n + 2):
    print((comb.comb(n + 1, i) - comb.comb(n - (r - l), i - 1)) % mod)

# Buggy version:
N=int(input())
A=list(map(int,input().split()))
from collections import Counter
two=0
a=Counter(A)
for k,v in a.items():
  if v==2:
    two=k
LR=[]
for i in range(N):
  if A[i]==two:
    LR.append(i)
L=LR[0]
R=LR[1]
mod=10**9+7
P=[1 for i in range(10**6+1)]
for i in range(10**6):
  P[i+1]=P[i]*(i+1)%mod
L+=1
R+=1
def comb(a,b):
  if a>=b:
    return P[a]*pow(P[a-b],mod-2,mod)*pow(P[b],mod-2,mod)%mod
  else:
    return 0

for i in range(1,N+2):
  print(comb(N+1,i)-comb(N+L-R,i-1))

# Fixed version:
N=int(input())
A=list(map(int,input().split()))
from collections import Counter
two=0
a=Counter(A)
for k,v in a.items():
  if v==2:
    two=k
LR=[]
for i in range(N+1):
  if A[i]==two:
    LR.append(i)
L=LR[0]
R=LR[1]
mod=10**9+7
P=[1 for i in range(10**6+1)]
for i in range(10**6):
  P[i+1]=P[i]*(i+1)%mod
L+=1
R+=1
def comb(a,b):
  if a>=b:
    return P[a]*pow(P[a-b],mod-2,mod)*pow(P[b],mod-2,mod)%mod
  else:
    return 0

for i in range(1,N+2):
  print((comb(N+1,i)-comb(N+L-R,i-1))%mod)

# Buggy version:
import sys
input = sys.stdin.readline

n = int(input())
mod = pow(10, 9)+7
ct = [1]*(n+1)
for i in range(1, n+1):
  ct[i] = ct[i-1]*i%mod

def comb(n, k):
  res = ct[n]*pow(ct[n-k], mod-2, mod)%mod*pow(ct[k], mod-2, mod)%mod
  return res

def main():
  a = [int(x) for x in input().split()]

  already = [-1]*n
  for i in range(n+1):
    if already[a[i]-1] != -1:
      f, s = i-already[a[i]-1], n-i
      break
    already[a[i]-1] = i
    
  ans = [0]*(n+1)
  c = 1
  for i in range(n+1):
    c = c*(n+1-i)%mod*pow(i+1, mod-2, mod)%mod
    ans[i] += c%mod
  
  for i in range(n):
    if s < i:
      break
    ans[i] += mod-(comb(s, i))%mod 
    ans[i] %= mod
  for a in ans:
    print(a)

if __name__ == "__main__":
  main()

# Fixed version:
import sys
input = sys.stdin.readline

n = int(input())
mod = pow(10, 9)+7
ct = [1]*(n+1)
for i in range(1, n+1):
  ct[i] = ct[i-1]*i%mod

def comb(n, k):
  res = ct[n]*pow(ct[n-k], mod-2, mod)%mod*pow(ct[k], mod-2, mod)%mod
  return res

def main():
  a = [int(x) for x in input().split()]

  already = [-1]*n
  for i in range(n+1):
    if already[a[i]-1] != -1:
      f, s = already[a[i]-1], n-i
      break
    already[a[i]-1] = i
    
  ans = [0]*(n+1)
  c = 1
  for i in range(n+1):
    c = c*(n+1-i)%mod*pow(i+1, mod-2, mod)%mod
    ans[i] += c%mod

  for i in range(n):
    if s+f >= i:
      ans[i] += mod-(comb(f+s, i))%mod
    ans[i] %= mod
  for a in ans:
    print(a)

if __name__ == "__main__":
  main()

# Buggy version:
n=int(input())
l=list(map(int,input().split()))
memo={}

for i in range(n+1):
    if l[i]in memo:
        g=l[i]
        x,y=memo[g],i
        break
    memo[l[i]]=i
mod=10**9+7
print(x,y)
fact=[1]*(n+1+1)
inv=[1]*(n+1+1)
for i in range(2,n+1+1):
    fact[i]=i*fact[i-1]%mod
inv[-1]=pow(fact[-1],mod-2,mod)
for i in range(n+1,1,-1):
    inv[i-1]=inv[i]*i%mod
def comb(x,y):return fact[x]*inv[y]%mod*inv[x-y]%mod if x>=y>=0 else 0
print(n)
for i in range(2,n+2):
    ans=comb(n+1,i)
    if n-y+x>=i-1:ans-=comb(x+n-y,i-1)
    else:ans-=comb(x,i-1)-comb(n-y,i-1)
    
    print(ans)

# Fixed version:
n=int(input())
l=list(map(int,input().split()))
memo={}

for i in range(n+1):
    if l[i]in memo:
        g=l[i]
        x,y=memo[g],i
        break
    memo[l[i]]=i
mod=10**9+7

fact=[1]*(n+1+1)
inv=[1]*(n+1+1)
for i in range(2,n+1+1):
    fact[i]=i*fact[i-1]%mod
inv[-1]=pow(fact[-1],mod-2,mod)
for i in range(n+1,1,-1):
    inv[i-1]=inv[i]*i%mod
def comb(x,y):return fact[x]*inv[y]%mod*inv[x-y]%mod if x>=y>=0 else 0
for i in range(1,n+2):print((comb(n+1,i)-comb(x+n-y,i-1))%mod)

# Buggy version:
mod = 10 ** 9 + 7

SIZE = 10 ** 5 + 5
fact = [0] * SIZE
inv = [0] * SIZE
finv = [0] * SIZE
fact[0], fact[1] = 1, 1
inv[1] = 1
finv[0], finv[1] = 1, 1
for i in range(2, SIZE):
    fact[i] = fact[i - 1] * i % mod
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod


def nCr(n, r):
    if n < 0 or r < 0 or n < r:
        return 0
    return fact[n] * (finv[r] * finv[n - r] % mod) % mod


from collections import Counter


n = int(input())
A = list(map(int, input().split()))
counterA = Counter(A)
duplicate = 0
for num, count in counterA.items():
    if count == 2:
        duplicate = num
        break

duplicate_pos = []
for i, a in enumerate(A):
    if a == duplicate:
        duplicate_pos.append(i)

first, second, *_ = duplicate_pos

for k in range(1, n+2):
    base = nCr(n+1, k)
    duplicate_pattern = nCr(n-second, k-1)
    print(base - duplicate_pattern)


# Fixed version:
mod = 10 ** 9 + 7

SIZE = 10 ** 5 + 5
fact = [0] * SIZE
inv = [0] * SIZE
finv = [0] * SIZE
fact[0], fact[1] = 1, 1
inv[1] = 1
finv[0], finv[1] = 1, 1
for i in range(2, SIZE):
    fact[i] = fact[i - 1] * i % mod
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod


def nCr(n, r):
    if n < 0 or r < 0 or n < r:
        return 0
    return fact[n] * (finv[r] * finv[n - r] % mod) % mod


from collections import Counter


n = int(input())
A = list(map(int, input().split()))
counterA = Counter(A)
duplicate = 0
for num, count in counterA.items():
    if count == 2:
        duplicate = num
        break

duplicate_pos = []
for i, a in enumerate(A):
    if a == duplicate:
        duplicate_pos.append(i)

first, second, *_ = duplicate_pos

for k in range(1, n+2):
    base = nCr(n+1, k)
    duplicate_pattern = nCr(first + n-second, k-1)
    print((base - duplicate_pattern) % mod)

# Buggy version:

class Combination:
    def __init__(self, n, mod):
        fact = [0]*(n+1)
        ifact = [0]*(n+1)
        fact[0] = 1
        for i in range(1, n+1):
            fact[i] = (fact[i-1]*i) % mod
        # 1/n!を逆元で求める
        ifact[n] = pow(fact[n], mod-2, mod)
        for i in range(n, 0, -1):
            ifact[i-1] = (ifact[i]*i) % mod

        self.n = n
        self.mod = mod
        self.fact = fact
        self.ifact = ifact

    def choose(self, n, r):
        if r < 0 or r > n:
            return 0
        ret = (self.fact[n]*self.ifact[r]) % self.mod
        return (ret*self.ifact[n-r]) % self.mod


n = int(input())
*a, = map(int, input().split())
indices = [-1]*n
l, r = 0, 0
for i in range(n+1):
    if indices[a[i]-1] != -1:
        l = indices[a[i]-1]
        r = i
        break
    indices[a[i]-1] = i

MOD = 10**9+7
c = Combination(n+100, MOD)
for i in range(1, n+2):
    ans = c.choose(n+1, i) - c.choose(l-1+n-r, i-1)
    print(ans)


# Fixed version:

class Combination:
    def __init__(self, n, mod):
        fact = [0]*(n+1)
        ifact = [0]*(n+1)
        fact[0] = 1
        for i in range(1, n+1):
            fact[i] = (fact[i-1]*i) % mod
        # 1/n!を逆元で求める
        ifact[n] = pow(fact[n], mod-2, mod)
        for i in range(n, 0, -1):
            ifact[i-1] = (ifact[i]*i) % mod

        self.n = n
        self.mod = mod
        self.fact = fact
        self.ifact = ifact

    def choose(self, n, r):
        if r < 0 or r > n:
            return 0
        ret = (self.fact[n]*self.ifact[r]) % self.mod
        return (ret*self.ifact[n-r]) % self.mod


n = int(input())
*a, = map(int, input().split())
indices = [-1]*n
l, r = 0, 0
for i in range(n+1):
    if indices[a[i]-1] != -1:
        l = indices[a[i]-1]
        r = i
        break
    indices[a[i]-1] = i

MOD = 10**9+7
c = Combination(n+2, MOD)
for i in range(1, n+2):
    ans = c.choose(n+1, i) - c.choose(l+n-r, i-1)
    ans = (ans+MOD) % MOD
    print(ans)

# Buggy version:
n = int(input())
a = list(map(int, input().split()))
b = [0]*(n+1)
for i in range(n):
    if b[a[i]] == 0:
        b[a[i]] += 1
    else:
        d = a[i]

l = 0
r = 0
c = 0
for i in range(n+1):
    if a[i] != d and c == 0:
        l += 1
    elif a[i] != d and c == 2:
        r += 1
    if a[i] == d:
        c += 1


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9 + 7
N = 100001
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


print(n)
for i in range(2, n+2):
    print(cmb(n+1, i, mod)-max(0, r-i+2)-max(0, l-i+2))


# Fixed version:
n = int(input())
a = list(map(int, input().split()))
b = [0]*(n+1)
for i in range(n+1):
    if b[a[i]] == 0:
        b[a[i]] += 1
    else:
        d = a[i]

l = 0
r = 0
c = 0
for i in range(n+1):
    if a[i] != d and c == 0:
        l += 1
    elif a[i] != d and c == 2:
        r += 1
    elif a[i] == d:
        c += 1


def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9 + 7
N = 100011
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

for i in range(1, n+2):
    print((cmb(n+1, i, mod)-cmb(r+l, i-1, mod))%mod)

# Buggy version:
n = int(input())
a = list(map(int, input().split()))

from collections import Counter
c = Counter(a)
for k in c.keys():
    if c[k] == 2:
        break
l = []
for i in range(len(a)):
    if a[i] == k:
        l.append(i)
    if len(l) == 2:
        break
d = n - l[1] + l[0]

def power(x, y):
    if   y == 0     : return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y // 2) ** 2 % mod
    else            : return power(x, y // 2) ** 2 * x % mod

mod = 10 ** 9 + 7

factorial = [1]
for i in range(1, N):
    factorial.append(factorial[i - 1] * i % mod)

inverseFactorial = [0] * N
inverseFactorial[N - 1] = power(factorial[N - 1], mod - 2)
for i in range(N - 2, -1, -1):
    inverseFactorial[i] = inverseFactorial[i + 1] * (i + 1) % mod

def comb(x, y):
    return factorial[x] * inverseFactorial[y] * inverseFactorial[x - y] % mod

for k in range(1, n + 2):
    if d >= k - 1:
        print((comb(n+1, k) - comb(d, k-1)) % mod)
    else:
        print(comb(n+1, k))


# Fixed version:
n = int(input())
a = list(map(int, input().split()))

from collections import Counter
c = Counter(a)
for k in c.keys():
    if c[k] == 2:
        break
l = []
for i in range(len(a)):
    if a[i] == k:
        l.append(i)
    if len(l) == 2:
        break
d = n - l[1] + l[0]

def power(x, y):
    if   y == 0     : return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y // 2) ** 2 % mod
    else            : return power(x, y // 2) ** 2 * x % mod

mod = 10 ** 9 + 7
N = n + 2

factorial = [1]
for i in range(1, N):
    factorial.append(factorial[i - 1] * i % mod)

inverseFactorial = [0] * N
inverseFactorial[N - 1] = power(factorial[N - 1], mod - 2)
for i in range(N - 2, -1, -1):
    inverseFactorial[i] = inverseFactorial[i + 1] * (i + 1) % mod

def comb(x, y):
    return factorial[x] * inverseFactorial[y] * inverseFactorial[x - y] % mod

for k in range(1, n + 2):
    if d >= k - 1:
        print((comb(n+1, k) - comb(d, k-1)) % mod)
    else:
        print(comb(n+1, k))

# Buggy version:
MOD = 10 ** 9 + 7
n = int(input())
a = list(map(int, input().split()))
lst = [-1] * n

# O(N)
for i in range(n + 1):
    if lst[a[i] - 1] != -1:
        first = lst[a[i] - 1]
        second = i
        break
    lst[a[i] - 1] = i

print (first, second)    
left = first
right = n - second

U = 10 ** 5 + 1
def power_mod(a, n):
    if n == 0:
        return 1
    x = power_mod(a//2)

def make_fact(fact, fact_inv):
    for i in range(1, U + 1):
        fact[i] = (fact[i - 1] * i) % MOD
    fact_inv[U] = pow(fact[U], MOD - 2, MOD)
    for i in range(U, 0, -1):
        fact_inv[i - 1] = (fact_inv[i] * i) % MOD

def comb(n, k):
    print ('A')
    if k < 0 or n < k:
        return 0
    x = fact[n]
    x *= fact_inv[k]
    x %= MOD
    x *= fact_inv[n - k]
    x %= MOD
    return x

fact = [1] * (U + 1)
fact_inv = [1] * (U + 1)
make_fact(fact, fact_inv)

for i in range(1, n + 2):
    ans = comb(n + 1, i) - comb(left + right, i - 1)
    print (ans % MOD)

# Fixed version:
MOD = 10 ** 9 + 7
n = int(input())
a = list(map(int, input().split()))
lst = [-1] * n

# O(N)
for i in range(n + 1):
    if lst[a[i] - 1] != -1:
        first = lst[a[i] - 1]
        second = i
        break
    lst[a[i] - 1] = i

# print (first, second)    
left = first
right = n - second

U = 10 ** 5 + 1
def power_mod(a, n):
    if n == 0:
        return 1
    x = power_mod(a//2)

def make_fact(fact, fact_inv):
    for i in range(1, U + 1):
        fact[i] = (fact[i - 1] * i) % MOD
    fact_inv[U] = pow(fact[U], MOD - 2, MOD)
    for i in range(U, 0, -1):
        fact_inv[i - 1] = (fact_inv[i] * i) % MOD

def comb(n, k):
    if k < 0 or n < k:
        return 0
    x = fact[n]
    x *= fact_inv[k]
    x %= MOD
    x *= fact_inv[n - k]
    x %= MOD
    return x

fact = [1] * (U + 1)
fact_inv = [1] * (U + 1)
make_fact(fact, fact_inv)

for i in range(1, n + 2):
    ans = comb(n + 1, i) - comb(left + right, i - 1)
    print (ans % MOD)

# Buggy version:
mod = 10**9+7
fact = [1]*(10**5+2)
for n in range(1,10**5+2):
    fact[n] = n*fact[n-1]%mod
def comb(n,k):
    return fact[n]*pow(fact[k],mod-2,mod)*pow(fact[n-k],mod-2,mod)%mod

N = int(input())
a = list(map(int,input().split()))
c = [-1]*N
for j in range(N+1):
    if c[a[j]-1] != -1:
        break
    c[a[j]-1] = j
i = c[a[j]-1]
j = N-j

for k in range(1,N+2):
    if k == 1:
        print(N)
    else:
        ans = comb(N+1,k)
        if k-1<=i:
            ans -= comb(i,k-1)
        if k-1<=j:
            ans -= comb(j,k-1)
        print(ans%mod)

# Fixed version:
mod = 10**9+7
fact = [1]*(10**5+2)
for n in range(1,10**5+2):
    fact[n] = n*fact[n-1]%mod
def comb(n,k):
    return fact[n]*pow(fact[k],mod-2,mod)*pow(fact[n-k],mod-2,mod)%mod

N = int(input())
a = list(map(int,input().split()))
c = [-1]*N
for j in range(N+1):
    if c[a[j]-1] != -1:
        break
    c[a[j]-1] = j
i = c[a[j]-1]
j = N-j

for k in range(1,N+2):
    ans = comb(N+1,k)
    if k-1<=i+j:
        ans -= comb(i+j,k-1)
    print(ans%mod)

# Buggy version:
N = int(input())
A = [int(_) for _ in input().split()]
mod = 10**9 + 7

f = [1] * (N + 2)
fi = [1] * (N + 2)
for i in range(2, N + 2):
    f[i] = i * f[i - 1]
    f[i] %= mod
for i in range(2, N + 2):
    fi[i] = fi[i - 1] * pow(i, mod - 2, mod)
    fi[i] %= mod


def comb(n, r):
    if 0 <= n and 0 <= r and 0 <= n - r:
        return (f[n] * fi[r] * fi[n - r]) % mod
    else:
        return 0


b = set()
for a in A:
    if a in b:
        break
    b.add(a)
c = []
for i in range(N):
    if A[i] == a:
        c += [i]
i, j = c
for x in range(1, N + 2):
    print((comb(N + 1, x) - (comb(N - j + i, x - 1))) % mod)


# Fixed version:
N = int(input())
A = [int(_) for _ in input().split()]
mod = 10**9 + 7

f = [1] * (N + 2)
fi = [1] * (N + 2)
for i in range(2, N + 2):
    f[i] = i * f[i - 1]
    f[i] %= mod
for i in range(2, N + 2):
    fi[i] = fi[i - 1] * pow(i, mod - 2, mod)
    fi[i] %= mod


def comb(n, r):
    if 0 <= n and 0 <= r and 0 <= n - r:
        return (f[n] * fi[r] * fi[n - r]) % mod
    else:
        return 0


b = set()
for a in A:
    if a in b:
        break
    b.add(a)
c = []
for i in range(N + 1):
    if A[i] == a:
        c += [i]
i, j = c
for x in range(1, N + 2):
    print((comb(N + 1, x) - (comb(N - j + i, x - 1))) % mod)

# Buggy version:
n = int(input())
A= list(map(int, input().split()))

mod = int(1e9+7)

class combinationmod():
  def __init__(self,MAX, mod):
    self.mod =mod
    self.fac=[0]*(MAX+1)
    self.finv=[0]*(MAX+1)
    self.inv=[0]*(MAX+1)
    self.fac[0]=self.fac[1]=1
    self.finv[0]=self.finv[1]=1
    self.inv[1]=1
    for i in range(2,MAX+1):
      self.fac[i] = self.fac[i-1]*i%mod
      self.inv[i] = (-self.inv[mod%i]*(mod//i))%mod
      self.finv[i] = self.finv[i-1]* self.inv[i] %mod

  def nCk(self,n,k):
    if n<k or n<0 or k<0:
      return 0
    return self.fac[n]*(self.finv[k]*self.finv[n-k]%self.mod)%self.mod
  
memo={}
for i, a in enumerate(A):
  if a in memo:
    L = memo[a]
    R = len(A) - i-1
    break
  else:
    memo[a] = i
    
c = combinationmod(n,mod)
for k in range(1,n+2):
  print(c.nCk(n,k) - c.nCk(L+R,k-1))


# Fixed version:
n = int(input())
A= list(map(int, input().split()))

mod = 10**9+7

class combinationmod():
  def __init__(self,MAX, mod):
    self.mod =mod
    self.fac=[0]*(MAX+1)
    self.finv=[0]*(MAX+1)
    self.inv=[0]*(MAX+1)
    self.fac[0]=self.fac[1]=1
    self.finv[0]=self.finv[1]=1
    self.inv[1]=1
    for i in range(2,MAX+1):
      self.fac[i] = self.fac[i-1]*i%self.mod
      self.inv[i] = (-self.inv[mod%i]*(mod//i))%self.mod
      self.finv[i] = self.finv[i-1]* self.inv[i] %self.mod

  def nCk(self,n,k):
    if n<k or n<0 or k<0:
      return 0
    return self.fac[n]*(self.finv[k]*self.finv[n-k]%self.mod)%self.mod
  
memo={}
for i, a in enumerate(A):
  if a in memo:
    L = memo[a]
    R = len(A) - i-1
    break
  else:
    memo[a] = i
    
c = combinationmod(n+1,mod)
for k in range(1,n+2):
  print((c.nCk(n+1,k) - c.nCk(L+R,k-1))%mod)

# Buggy version:
def mod_inv(n: int, mod: int)->int:
    b, u, v = mod, 1, 0
    while b > 0:
        t = n // b

        n -= t * b
        u -= t * v

        a, b = b, a
        u, v = v, u

    return (u+mod) % mod


def _11(N: int, A: list)->list:
    MOD = 10**9 + 7

    d = {}
    l, r = 0, 0
    for i, a in enumerate(A):
        if a in d:
            l, r = d[a], N-i
        else:
            d[a] = i

    c1, c2 = [1]*(N+2), [1]*(N+2)
    for i in range(N+1):
        c1[i+1] = (c1[i] * (N+1-i) * mod_inv(i+1, MOD)) % MOD
        c2[i+1] = (c2[i] * (l+r-i) * mod_inv(i+1, MOD)) % MOD

    return [(c1[k+1]-c2[k]+MOD) % MOD for k in range(N+1)]


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = _11(N, A)
    print('\n'.join(map(str, ans)))


# Fixed version:
def mod_inv(n: int, mod: int)->int:
    b, u, v = mod, 1, 0
    while b > 0:
        t = n // b

        n -= t * b
        u -= t * v

        n, b = b, n
        u, v = v, u

    return (u+mod) % mod


def _11(N: int, A: list)->list:
    MOD = 10**9 + 7

    d = {}
    l, r = 0, 0
    for i, a in enumerate(A):
        if a in d:
            l, r = d[a], N-i
        else:
            d[a] = i

    c1, c2 = [1]*(N+2), [1]*(N+2)
    for i in range(N+1):
        c1[i+1] = (c1[i] * (N+1-i) * mod_inv(i+1, MOD)) % MOD
        c2[i+1] = (c2[i] * (l+r-i) * mod_inv(i+1, MOD)) % MOD

    return [(c1[k+1]-c2[k]+MOD) % MOD for k in range(N+1)]


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = _11(N, A)
    print('\n'.join(map(str, ans)))

# Buggy version:
n = int(input())
a = list(input().split())

class ModInv:
    def __init__(self, size, MOD):
        self.inv = [0] * (size + 1)
        self.inv[1] = 1
        for i in range(2, size + 1):
            self.inv[i] = (-(MOD // i) * self.inv[MOD%i]) % MOD

if n == 1:
    print(1)
    print(1)
    exit()

MOD = 10 ** 9 + 7

b = sorted(a)

for i in range(n):
    if b[i] == b[i + 1]:
        d = b[i]
        break

first = a.index(d)
for i in range(first + 1, n + 1):
    if a[i] == d:
        second = i

w = n + first - second

inv = ModInv(n + 1, MOD)
c = [1] * (n + 2)
d = [1] * (n + 2)

for i in range(n + 1):
    d[i + 1] = (d[i] * inv.inv[i + 1]) % MOD
for i in range(n + 1):
    c[i + 1] = (c[i] * (i + 1)) % MOD

print(n)
for k in range(2, n + 2):
    if k < w:
        print( (((c[n+1] * d[k]) * d[n+1-k]) % MOD) - (((c[w] * d[k]) * d[w-k]) % MOD) )
    else:
        print( ((c[n+1] * d[k]) * d[n+1-k]) % MOD )

# Fixed version:
n = int(input())
a = list(map(int, input().split()))

class ModInv:
    def __init__(self, size, MOD):
        self.inv = [0] * (size + 1)
        self.inv[1] = 1
        for i in range(2, size + 1):
            self.inv[i] = (-(MOD // i) * self.inv[MOD%i]) % MOD

if n == 1:
    print(1)
    print(1)
    exit()

MOD = 10 ** 9 + 7

b = sorted(a)

for i in range(n):
    if b[i] == b[i + 1]:
        break

first = a.index(b[i])
for i in range(first + 1, n + 1):
    if a[i] == a[first]:
        second = i

w = n + first - second

inv = ModInv(n + 1, MOD)
c = [1] * (n + 2)
d = [1] * (n + 2)

for i in range(n + 1):
    d[i + 1] = (d[i] * inv.inv[i + 1]) % MOD
for i in range(n + 1):
    c[i + 1] = (c[i] * (i + 1)) % MOD

print(n)
for k in range(2, n + 2):
    ans = (((c[n+1] * d[n+1-k]) % MOD) * d[k]) % MOD
    if w >= k - 1:
        ans -= (((c[w] * d[w-k+1]) % MOD) * d[k-1]) % MOD
    print( ans % MOD )

# Buggy version:
n = int(input())
a = list(map(int, input().split()))
s = set()
index = 0
for i in range(n):
    if a[i] in s:
        index = i
    s.add(a[i])

#combination---
m = 10**9 + 7
fac = [1, 1]
inv = [1, 1]
finv = [1, 1]
for i in range(2, n+5):
    fac.append(fac[i-1] * i % m)
    inv.append(m - inv[m%i] * (m//i) % m)
    finv.append(finv[i-1] * inv[i] % m)

def nck(n, k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n-k] % m) % m

for k in range(1, n+2):
    print(nck(n+1, k) - nck(n-index, k-1))

# Fixed version:
n = int(input())
a = list(map(int, input().split()))
s = set()

index2 = 0
for i in range(n+1):
    if a[i] in s:
        index2 = i
    s.add(a[i])

index1 = 0
for i in range(n+1):
    if a[i] == a[index2]:
        index1 = i
        break

#combination---
m = 10**9 + 7
fac = [1, 1]
inv = [1, 1]
finv = [1, 1]
for i in range(2, n+5):
    fac.append(fac[i-1] * i % m)
    inv.append(m - inv[m%i] * (m//i) % m)
    finv.append(finv[i-1] * inv[i] % m)

def nck(n, k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n-k] % m) % m

#-----


for k in range(1, n+2):
    print((nck(n + 1, k) - nck(index1 + n - index2, k-1)) % m)

# Buggy version:
def factorial_memo(n, p):
  F = [1] * (n + 1)
  for i in range(n):
    F[i + 1] = F[i] * (i + 1) % p
  return F

def inverse(F, p):
  Finv = [x for x in F]
  Finv[-1] = pow(Finv[-1], p - 2, p)
  for i in range(len(F) - 2, 0, -1):
    Finv[i] = Finv[i + 1] * (i + 1) % p
  return Finv

def comb(a, b):
  if a < b:
    return 0
  return F[a] * Finv[a - b] * Finv[b] % p

n = int(input())
A = [int(x) for x in input().split()]
p = 10 ** 9 + 7
D = [-1] * n
double = [-1, -1]
for i, a in enumerate(A):
  if D[a - 1] == -1:
    D[a - 1] = i
  else:
    double = [D[a - 1], i]
    break
F = factorial_memo(n + 1, p)
Finv = inverse(F, p)
n_a = double[0]
n_b = n - double[1]
print(n)
C = [0] * n
for i in range(2, n + 2):
  cnt = (comb(n, i) + comb(n, i - 1) - max((n_a + n_b + 2 - i), 0)) % p
  print(cnt)
  

# Fixed version:
def factorial_memo(n, p):
  F = [1] * (n + 1)
  for i in range(n):
    F[i + 1] = F[i] * (i + 1) % p
  return F

def inverse(F, p):
  Finv = [x for x in F]
  Finv[-1] = pow(Finv[-1], p - 2, p)
  for i in range(len(F) - 2, 0, -1):
    Finv[i] = Finv[i + 1] * (i + 1) % p
  return Finv

def comb(a, b):
  if a < b:
    return 0
  return F[a] * Finv[a - b] * Finv[b] % p

n = int(input())
A = [int(x) for x in input().split()]
p = 10 ** 9 + 7
D = [-1] * n
double = [-1, -1]
for i, a in enumerate(A):
  if D[a - 1] == -1:
    D[a - 1] = i
  else:
    double = [D[a - 1], i]
    break
F = factorial_memo(n + 1, p)
Finv = inverse(F, p)
n_a = double[0]
n_b = n - double[1]
print(n)
C = [0] * n
for i in range(2, n + 2):
  cnt = (comb(n + 1, i) - comb(n_a + n_b, i - 1)) % p
  print(cnt)

# Buggy version:
def comb(n,k):
	if n<k or n==0: return 0
	elif k==0: return 1
	else: return f[n]*p[k]*p[n-k]%(10**9+7)
from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
twice = Counter(a).most_common(1)[0][0]
x,y = (i for i,j in enumerate(a) if j == twice)
num,y,f,p = 1,n-y,[1],[1]
for i in range(1,n+2):
	f.append(f[-1]*i%(10**9+7))
	p.append(pow(f[-1],10**9+5,10**9+7))
for i in range(1,x+y+2): print((comb(n+1,i)-comb(x+y,i-1))%(10**9+7))
for i in range(x+y+2,n+2): print(comb(n+1,i))

# Fixed version:
def comb(n,k):
	if n<k or n==0: return 0
	elif k==0: return 1
	else: return f[n]*p[k]*p[n-k]%(10**9+7)
from collections import Counter
n = int(input())
print(n)
a = [int(i) for i in input().split()]
twice = Counter(a).most_common(1)[0][0]
x,y = (i for i,j in enumerate(a) if j == twice)
num,y,f,p = 1,n-y,[1],[1]
for i in range(1,n+2):
	f.append(f[-1]*i%(10**9+7))
	p.append(pow(f[-1],10**9+5,10**9+7))
for i in range(2,x+y+2): print((comb(n+1,i)-comb(x+y,i-1))%(10**9+7))
for i in range(x+y+2,n+2): print(comb(n+1,i))