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.

-----Notes-----
 - 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. For example, the sequences 1,3,5 and 1,2,3 are subsequences of 1,2,3,4,5, while 3,1,2 and 1,10,100 are not.

-----Constraints-----
 - 1 \leq n \leq 10^5
 - 1 \leq a_i \leq n
 - Each of the integers 1,...,n appears in the sequence.
 - n and a_i are integers.

-----Input-----
Input is given from Standard Input in the following format:
n
a_1 a_2 ... a_{n+1}

-----Output-----
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.

-----Sample Input-----
3
1 2 1 3

-----Sample Output-----
3
5
4
1

There are three subsequences with length 1: 1 and 2 and 3.
There are five subsequences with length 2: 1,1 and 1,2 and 1,3 and 2,1 and 2,3.
There are four subsequences with length 3: 1,1,3 and 1,2,1 and 1,2,3 and 2,1,3.
There is one subsequence with length 4: 1,2,1,3.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
a = list(map(int, input().split()))

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

l, r = -1, -1
for i in range(n+1):
    if l < 0:
        if a[i] == d:
            l = i
    else:
        if a[i] == d:
            r = i

f = [1 for _ in range(n+2)]
f_inv = [1 for _ in range(n+2)]
mod = 10 ** 9 + 7
for i in range(1, n+2):
    f[i] = f[i-1] * i % mod
    f_inv[i] = pow(f[i], mod-2, mod)

def comb(n, k):
    return f[n] * f_inv[k] * f_inv[n-k] % mod


for k in range(1, n+2):
    ans = 0

    if k >= 2:
        ans += comb(n-1, k-2)
        ans %= mod

    if n - 1 >= k:
        ans += comb(n-1, k)
        ans %= mod

    if n >= k:
        ans += 2 * comb(n-1, k-1)
        ans %= mod

    if n + l - r >= k - 1:
        ans -= comb(n+l-r, k-1)
        ans %= mod

    print(ans)


from collections import Counter

n=int(input())
a=list(map(int,input().split()))
mod = 10**9+7

factorial=[1 for i in range(n+2)]
for i in range(1,n+2):
    if i==1:factorial[i]=1
    else:factorial[i] = factorial[i-1]*i % mod

def comb(n,k):
    return factorial[n]*pow(factorial[n-k]*factorial[k], -1, mod)

mc = Counter(a).most_common()[0][0]

indices=[]
for i in range(n+1):
  if a[i]==mc:indices.append(i)
    
m = [indices[0]+1,n+1-indices[1]]
m = sorted(m)
    
for i in range(1,n+2):
  if i == 1:
    print(n)
    continue
  if i == n+1:
    print(1)
    continue
  if i <= m[0]+m[1]-1:
    print((comb(n+1,i) - comb(m[0]+m[1]-2,i-1)) % mod)
  else:
    print(comb(n+1,i) % mod)

import sys
mod = 7 + 10 ** 9

def comb(n, r, fact, revfact, mod):
    return (fact[n] * revfact[n-r] * revfact[r]) % mod

def solve():
    input = sys.stdin.readline
    N = int(input())
    A = [int(a) for a in input().split()]
    Ad = dict()
    double = []
    for i, a in enumerate(A):
        if a in Ad:
            Ad[a].append(i)
            double = Ad[a]
        else: Ad[a] = [i]

    fact = [1] * (N + 2)
    for i in range(1, N + 2): fact[i] = (fact[i - 1] * i) % mod
    revfact = [1] * (N + 2)
    revfact[N + 1] = pow(fact[N + 1], mod - 2, mod)
    for i in reversed(range(1, N + 1)):revfact[i] = ((i + 1) * revfact[i + 1]) % mod
    mayOverCount = double[0] + N - double[1]
    
    for k in range(N + 1):
        total = comb(N + 1, k + 1, fact, revfact, mod)
        if k <= mayOverCount: 
            total += mod - comb(mayOverCount, k, fact, revfact, mod)
            total %= mod
        print(total)

    return 0

def __starting_point():
    solve()
__starting_point()

from collections import Counter
N = int(input())
As = list(map(int, input().split()))

MOD = 10 ** 9 + 7

factorials = [1]
fact_invs = [1]
for i in range(1, N+2):
    factorials.append((factorials[-1]*i) % MOD)
    fact_invs.append(pow(factorials[-1], MOD-2, MOD))
fact_invs.append(1)

def combi(n, k):
    if n < k:
        return 0
    ret = factorials[n]
    ret *= fact_invs[k]
    ret %= MOD
    ret *= fact_invs[n-k]
    return ret % MOD

ct = Counter(As)
mc = ct.most_common(1)[0][0]

L = R = None
for i, a in enumerate(As):
    if a == mc:
        if L is None:
            L = i
        else:
            R = N - i

for k in range(1, N+2):
    print(((combi(N+1, k) - combi(L+R, k-1)) % MOD))


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 = 10**5 + 1
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 )
 
n = int(input())
A = list(map(int,input().split()))
 
val = sum(A) - sum(set(A))
i = -1
j = -1
for k in range(n+1):
    if A[k] == val:
        if i == -1:
            i = k
        elif j == -1:
            j = k
            break
for k in range(1,n+2):
    print(((cmb(n+1, k, mod) - cmb(n + i - j, k - 1, mod)) % mod))


#11
from collections import Counter
N = int(input())
a = list(map(int, input().split()))


mod = 10 ** 9 + 7
up = [1 for i in range(N+1)]
for i in range(2, N+1):
    up[i] = up[i-1]*i % mod
down = [1 for i in range(N+1)]
down[N] = pow(up[N], mod-2, mod)
for i in range(N-1, 0, -1):
    down[i] = (i+1)*down[i+1] % mod


def ncr(n, r):
    if not n >= r >= 0:
        return 0
    else:
        return up[n]*down[n-r]*down[r] % mod


duplicated_number, _cnt = Counter(a).most_common()[0]
index_que = []

for i in range(N+1):
    if a[i] == duplicated_number:
        index_que.append(i)
        
A, B = min(index_que), max(index_que)

for k in range(1, N+2):
    if k == 1:
        print(N)
    else:
        ans = ncr(N-1, k-2)+ncr(N-1, k)+2 * ncr(N-1, k-1)-ncr(N-B+A, k-1)
        print((ans % mod))



n = int(input())
a = list(map(int, input().split()))

mod = 10**9+7
g1 = [1, 1]
g2 = [1, 1]
inv = [0, 1]
for i in range(2, n+2):
    g1.append((g1[-1] * i) % mod)
    inv.append((-inv[mod%i] * (mod//i)) % mod)
    g2.append((g2[-1] * inv[-1]) % mod)

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

t = sum(a)-n*(n+1)//2
m = a.index(t) + a[::-1].index(t)
for k in range(1, n+2):
    print((comb(n+1, k)-comb(m, k-1))%mod)

MOD = 10 ** 9 + 7
MAXN = 100005
factorial = [1]
for i in range(1, MAXN + 1):
    factorial.append(factorial[-1] * i % MOD)

inv_factorial = [-1] * (MAXN + 1)
inv_factorial[-1] = pow(factorial[-1], MOD-2, MOD)
for i in reversed(range(MAXN)):
    inv_factorial[i] = inv_factorial[i + 1] * (i + 1) % MOD

def fact(n):
    return factorial[n]

def nck(n, k):
    if k > n or k < 0:
        return 0
    else:
        return factorial[n]*inv_factorial[n - k]*inv_factorial[k]%MOD

def main():
    n = int(input())
    a = list(map(int,input().split()))
    dic = {i:[] for i in range(1,n + 1)}
    for i in range(n + 1):
        dic[a[i]].append(i)
        if len(dic[a[i]]) >= 2:
            l,r = dic[a[i]][0],dic[a[i]][1]
            break

    r = n - r
    print(n)
    for i in range(2,n + 2):
        print((nck(n + 1,i) - nck(l + r,i - 1) + MOD)%MOD)
def __starting_point():
    main()
__starting_point()

mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
c=[0]*n
for i in a:c[i-1]+=1
ind=c.index(2)
x=[]
for i in range(n+1):
    if a[i]==ind+1:x.append(i)
m=n+x[0]-x[1]
ans=1
anss=1
for k in range(1,n+2):
    ans=(ans*(n-k+2))%mod
    ans=ans*pow(k,mod-2,mod)%mod
    if k==1:print(n);continue
    anss=(anss*(m-k+2))%mod
    anss=anss*pow(k-1,mod-2,mod)%mod
    if k-1>m:print(ans);continue
    print((ans-anss)%mod)

# -*- 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 list(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 = 10 ** 18
MOD = 10 ** 9 + 7

class ModTools:
    """ 階乗たくさん使う時用のテーブル準備 """

    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

N = INT()
A = LIST()

# 重複している値を見つけて、indexを取る
dup = 0
for k, v in list(Counter(A).items()):
    if v == 2:
        dup = k
        break
st = []
for i, a in enumerate(A):
    if a == dup:
        st.append(i)
# 重複した値より外側にある要素数
M = N - (st[1] - st[0])

mt = ModTools(N+1, MOD)
for i in range(N+1):
    # 全組み合わせから、重複した値の影響を受ける分を引く
    ans = mt.nCr(N+1, i+1) - mt.nCr(M, i)
    print((ans % MOD))


def exteuc(a, b):
    # ax + by = gcd(a, b)
    if b == 0:
        return 1, 0, a
    y, x, v = exteuc(b, a % b)
    y -= (a//b) * x
    return x, y, v


def modinv(a, mod):
    x, _, _ = exteuc(a, mod)
    return x % mod


def main():
    MOD = 10**9 + 7
    N = int(input())
    A = list(map(int, input().split(' ')))
    # calculate duplicate indices
    # Ex. [1, 4, 2, 1, 3] -> 0, 3
    dup_first_index, dup_second_index = -1, -1
    indices = [-1 for _ in range(N)]
    for i, a in enumerate(A):
        if indices[a - 1] != -1:
            dup_first_index, dup_second_index = indices[a - 1], i
            break
        indices[a - 1] = i
    # Ex. [1, 4, 2, 5, 4, 3, 6] -> [1] + [3, 6] -> 3
    s = dup_first_index + N - dup_second_index
    # calculate answer
    ans = [0 for _ in range(N + 1)]
    comb_n1, comb_s = N + 1, 1  # comb(N + 1, 1), comb(s, 0)
    for i in range(N + 1):
        ans[i] = comb_n1  # comb(N + 1, i + 1)
        comb_n1 *= (N + 1) - (i + 1)
        comb_n1 *= modinv(i + 2, MOD)
        comb_n1 %= MOD
        if s >= i:
            ans[i] -= comb_s  # comb(s, i)
            comb_s *= s - i
            comb_s *= modinv(i + 1, MOD)
            comb_s %= MOD
        ans[i] %= MOD
    for a in ans:
        print(a)


def __starting_point():
    main()
__starting_point()

n = int(input())
A = list(map(int, input().split()))
idx = [-1]*(n+1)
# 2回現れた文字のidxをl,rに持つ
for i, a in enumerate(A, 1):
    if idx[a] == -1:
        idx[a] = i
    else:
        r = i
        l = idx[a]


MAX_N = 10**6+5
MOD = 10**9 + 7
fac = [0]*(MAX_N)
fac[0] = 1
for i in range(1, MAX_N):
    fac[i] = i*fac[i-1] % MOD
fac_inv = [0]*MAX_N
fac_inv[-1] = pow(fac[-1], MOD-2, MOD)
for i in range(MAX_N-2, -1, -1):
    fac_inv[i] = fac_inv[i+1]*(i+1) % MOD


def comb(n, k):
    if k < 0 or k > n:
        return 0
    return fac[n]*fac_inv[k]*fac_inv[n-k] % MOD


# print(comb(0, 0))
# print(l, r)
# print(fac[:5])
# print(fac_inv[:5])
for k in range(1, n+2):
    #    print(comb(n+1, k), comb(l-1+n-r, k-1))
    ans = (comb(n+1, k)-comb(l-1+n+1-r, k-1)) % MOD
    print(ans)


def comb(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
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
n=int(input())
mod=10**9+7
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 )
import copy
a=list(map(int,input().split()))
b=copy.deepcopy(a)
b.sort()
tmp=-1
for i in range(n):
  if b[i]==b[i+1]:
    tmp=b[i]
r=[]
for i in range(n+1):
  if a[i]==tmp:
    r.append(i)
y=abs(r[1]-r[0]-1)
for k in range(1,n+2):
  ans=(comb(n-1,k,mod)+comb(n-1,k-2,mod)+comb(n-1,k-1,mod)*2-comb(n-1-y,k-1,mod))%mod
  print(ans)

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 = 10**6
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 )
N = int(input())
A = [int(c) for c in input().split()]
log = [0]*(N+1)
for i in range(N+1):
  if log[A[i]]!=0:
    j = i
  log[A[i]] = 1
c = A[j]
i = A.index(c)
m = i+N-j
for k in range(1,N+2):
  if m>=k-1:
    x = cmb(N+1,k,mod)-cmb(m,k-1,mod)
    print((x%mod))
  else:
    x = cmb(N+1,k,mod)
    print((x%mod))


mod = 10**9+7
MAX = 10**5+1
fact = [1]*(MAX+1)
for i in range(1, MAX+1):
    fact[i] = (fact[i-1]*i)%mod
inv = [1]*(MAX+1)
for i in range(2, MAX+1):
    inv[i] = inv[mod%i]*(mod-mod//i)%mod
fact_inv = [1] * (MAX + 1)
for i in range(1, MAX + 1):
    fact_inv[i] = fact_inv[i-1]*inv[i]%mod
def comb(n, r):
    if n < r:
        return 0
    return fact[n]*fact_inv[n-r]*fact_inv[r] % mod

n = int(input())
L = list(map(int,input().split()))
M = []
for i in range(n+1):
    M.append(L[i])
M.sort()
dou = 1 #重複する数
for i in range(n+1):
    if M[i] == dou:
        dou += 1
    else:
        dou = M[i]
        break
l = 0
r = 0
cnt = 0
for i in range(n+1):
    if L[i] == dou and cnt == 0:
        l = i+1
        cnt += 1
    elif L[i] == dou and cnt == 1:
        r = i+1
        break
for i in range(1,n+1):
    print(((comb(n+1,i)-comb(l+n-r,i-1))%mod))
print((1))


n = int(input())
a = list(map(int, input().split()))
D = {i: [0] for i in range(1, n+1)}
for i in range(n+1):
  D[a[i]][0] += 1
  D[a[i]].append(i)
pl, pr = 0, 0
for i in D:
  if D[i][0] == 2:
    pl = D[i][1]
    pr = D[i][2]
    break
L = pl
M = pr - pl - 1
N = n - pr
mod = int(1e9) + 7 # <-- input modulo
maxf = n+11          # <-- input factional limitation

def make_fact(n, k):
    tmp = n
    perm = [i for i in range(k)]
    L = [0 for _ in range(k)]
    for i in range(k):
        L[i] = tmp % (i + 1)
        tmp //= i + 1
    LL = [0 for _ in range(k)]
    for i in range(k):
        LL[i] = perm[L[-i-1]]
        for j in range(L[-i-1]+1, k):
            perm[j-1] = perm[j]
    return LL

def doubling(n, m, modulo=mod):
    y = 1
    base = n
    tmp = m
    while tmp != 0:
        if tmp % 2 == 1:
            y *= base
            if modulo > 0:
                y %= modulo
        base *= base
        if modulo > 0:
            base %= modulo
        tmp //= 2
    return y

def inved(a, modulo=mod):
    x, y, u, v, k, l = 1, 0, 0, 1, a, modulo
    while l != 0:
        x, y, u, v = u, v, x - u * (k // l), y - v * (k // l)
        k, l = l, k % l
    return x % modulo

fact = [1 for _ in range(maxf+1)]
invf = [1 for _ in range(maxf+1)]

for i in range(maxf):
    fact[i+1] = (fact[i] * (i+1)) % mod
invf[-1] = inved(fact[-1])
for i in range(maxf, 0, -1):
    invf[i-1] = (invf[i] * i) % mod

for i in range(1, n+2):
  S = fact[n+1]*invf[i]*invf[n-i+1]%mod
  if i <= n-M:
    S -= fact[n-1-M]*invf[i-1]*invf[n-M-i]%mod
    S %= mod
  print(S)


import sys
from collections import Counter

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


class CmbMod:
    def __init__(self, n, p):
        """
        二項係数nCr(n個の区別できるものからr個のものを選ぶ組み合わせの数)をpで割った余りを求める
        """
        self.n = n
        self.p = p
        self.fact = [1, 1]
        self.factinv = [1, 1]
        self.inv = [0, 1]

    def cmb_mod(self, n, r):
        """
        二項係数nCr(mod p)をO(r)にて計算。nが大きいがrは小さい時に使用。
        """
        numer, denom = 1, 1
        for i in range(r):
            numer = (numer * (n - i)) % self.p
            denom = (denom * (i + 1)) % self.p
        return (numer * pow(denom, self.p - 2, self.p)) % self.p

    def prep(self):
        """
        二項係数nCr(mod p)をO(1)で求める為の前処理をO(N)にて実行。
        """
        for i in range(2, self.n + 1):
            self.fact.append((self.fact[-1] * i) % self.p)
            self.inv.append((-self.inv[self.p % i] * (self.p // i)) % self.p)
            self.factinv.append((self.factinv[-1] * self.inv[-1]) % self.p)

    def cmb_mod_with_prep(self, n, r):
        """
        二項係数nCr(mod p)をO(1)で求める。事前にprepを実行する事。
        """
        if (r < 0) or (n < r):
            return 0
        r = min(r, n - r)
        return self.fact[n] * self.factinv[r] * self.factinv[n - r] % self.p


def resolve():
    n = int(input())
    A = list(map(int, input().split()))

    D = Counter(A)
    dup = 0
    for k, v in list(D.items()):
        if v == 2:
            dup = k
            break

    flg = 1
    right, left = 0, 0
    for i in range(n + 1):
        if flg and A[i] == dup:
            left = i
            flg ^= 1
        elif A[i] == dup:
            right = i
            break

    remain = n - (right - left)
    cmb = CmbMod(n + 1, mod)
    cmb.prep()
    for i in range(1, n + 2):
        res = cmb.cmb_mod_with_prep(n + 1, i) - cmb.cmb_mod_with_prep(remain, i - 1)
        print((res % mod))


def __starting_point():
    resolve()

__starting_point()

MOD = 10 ** 9 + 7


def prepare(n):
    nonlocal MOD
    modFacts = [0] * (n + 1)
    modFacts[0] = 1
    for i in range(n):
        modFacts[i + 1] = (modFacts[i] * (i + 1)) % MOD

    invs = [1] * (n + 1)
    invs[n] = pow(modFacts[n], MOD - 2, MOD)
    for i in range(n, 1, -1):
        invs[i - 1] = (invs[i] * i) % MOD

    return modFacts, invs


N = int(input())
place = [0] * N
A = list(map(int, input().split()))
for i, s in enumerate(A):
    if place[s - 1] == 0:
        place[s - 1] = i + 1
    else:
        a = place[s - 1]
        b = i + 1
        break

modFacts, invs = prepare(N + 1)
cnt = pow(2, N + 1, MOD) - 1
cnt -= pow(2, a - 1, MOD) * pow(2, N + 1 - b, MOD)

la = a - 1
rb = N + 1 - b
t = la + rb
for k in range(1, N + 2):
    cnt = (modFacts[N + 1] * invs[k] * invs[N + 1 - k]) % MOD
    if t >= k - 1:
        cnt -= (modFacts[t] * invs[k - 1] * invs[t - (k - 1)])
    print((cnt % MOD))


N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7
from collections import Counter
ctr = Counter(A)
dup = ctr.most_common()[0][0]
i = A.index(dup)
j = A[::-1].index(dup)
l = i+j

MAXN = N+5
fac = [1,1] + [0]*MAXN
finv = [1,1] + [0]*MAXN
inv = [0,1] + [0]*MAXN
for i in range(2,MAXN+2):
    fac[i] = fac[i-1] * i % MOD
    inv[i] = -inv[MOD%i] * (MOD // i) % MOD
    finv[i] = finv[i-1] * inv[i] % MOD

def comb(n,r):
    if n < r: return 0
    if n < 0 or r < 0: return 0
    return fac[n] * (finv[r] * finv[n-r] % MOD) % MOD

ans = []
for k in range(1,N+2):
    ans.append(comb(N+1,k))
for k in range(l+1):
    ans[k] -= comb(l,k)
    ans[k] %= MOD
print(*ans, sep='\n')

# solution

n = int(input())
a = list(map(int, input().split()))
M = 10**9+7
res = [-1] * (n+1)
for i in range(n+1):
    if res[a[i]] == -1:
        res[a[i]] = i
    else:
        d = a[i]
        l, r = res[d], n-i
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
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, n + 2):
    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(l+r, i-1, mod)) % mod))


n = int(input())
alst = list(map(int, input().split()))
num_pos = [-1 for _ in range(n)]

MOD = 10 ** 9 + 7
N = n + 10

fact = [0 for _ in range(N)]
invfact = [0 for _ in range(N)]
fact[0] = 1
for i in range(1, N):
    fact[i] = fact[i - 1] * i % MOD

invfact[N - 1] = pow(fact[N - 1], MOD - 2, MOD)

for i in range(N - 2, -1, -1):
    invfact[i] = invfact[i + 1] * (i + 1) % MOD
def nCk(n, k):
    if k < 0 or n < k:
        return 0
    else:
        return fact[n] * invfact[k] * invfact[n - k] % MOD

for i, num in enumerate(alst):
    if num_pos[num - 1] == -1:
        num_pos[num - 1] = i
    else:
        bef = num_pos[num - 1]
        aft = n - i
for i in range(1, n + 2):
    ans = nCk(n + 1, i) - nCk(bef + aft, i - 1)
    ans %= MOD
    print(ans)
    
    


import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
p = 10**9+7

n = int(input())
a = list( map(int, input().split()))
count = [0]*n

for i in range(n+1):
    count[a[i]-1] += 1
    if count[a[i]-1] == 2:
        right = i
        left = a.index(a[i])
        break

def nCr_mod_p(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
N = 10 ** 5  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p), 0! = 1! = 1
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p), 0! = 1! = 1
inv = [0, 1]  # inv[n] = n^(-1) mod p, 0! = 1　だけど便宜上inv[0]=0にしてる

for i in range(2, N + 2):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

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


mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
c=[0]*n
for i in a:c[i-1]+=1
ind=c.index(2)
x=[]
for i in range(n+1):
    if a[i]==ind+1:x.append(i)
m=n+x[0]-x[1]
f=[1]
for i in range(1,n+2):f.append(f[-1]*i%mod)
def comb(n,r):return f[n]*pow(f[r],mod-2,mod)*pow(f[n-r],mod-2,mod)%mod
for k in range(1,n+2):
    if k==1:print(n);continue
    if k-1>m:print(comb(n+1,k));continue
    ans=comb(n+1,k)-comb(m,k-1)
    print(ans%mod)

def cmb(n, k, mod, fac, ifac):
    """
    nCkを計算する
    """
    k = min(k, n-k)
    return fac[n] * ifac[k] % mod * ifac[n-k] % mod if n >= k >= 0 else 0


def make_tables(mod, n):
    """
    階乗テーブル、逆元の階乗テーブルを作成する
    """
    fac = [1, 1] # 階乗テーブル・・・(1)
    ifac = [1, 1] #逆元の階乗テーブル・・・(2)
    inverse = [0, 1] #逆元テーブル・・・(3)

    for i in range(2, n+1):
        fac.append((fac[-1] * i) % mod)
        inverse.append((-inverse[mod % i] * (mod//i)) % mod)
        ifac.append((ifac[-1] * inverse[-1]) % mod)
    return fac, ifac


N = int(input())
A = list(map(int,input().split()))

MOD = 10**9 + 7
fac, ifac = make_tables(MOD,N+1)

ans = 0
INF = 10**9
x,y = 0,0
l = [INF]*(N+1)
for i in range(N+1):
  if l[A[i]-1] != INF:
    x = l[A[i]-1]
    y = i+1
    break
  l[A[i]-1] = i+1

for i in range(1,N+2):
  print((cmb(N+1,i,MOD,fac,ifac) - cmb(N+x-y,i-1,MOD,fac,ifac))%MOD)

n = int(input())
a = list(map(int, input().split()))
D = {i: [0] for i in range(1, n+1)}
for i in range(n+1):
  D[a[i]][0] += 1
  D[a[i]].append(i)
pl, pr = 0, 0
for i in D:
  if D[i][0] == 2:
    pl = D[i][1]
    pr = D[i][2]
    break
L = pl
M = pr - pl - 1
N = n - pr
mod = int(1e9) + 7 # <-- input modulo
maxf = n+11          # <-- input factional limitation

def make_fact(n, k):
    tmp = n
    perm = [i for i in range(k)]
    L = [0 for _ in range(k)]
    for i in range(k):
        L[i] = tmp % (i + 1)
        tmp //= i + 1
    LL = [0 for _ in range(k)]
    for i in range(k):
        LL[i] = perm[L[-i-1]]
        for j in range(L[-i-1]+1, k):
            perm[j-1] = perm[j]
    return LL

def doubling(n, m, modulo=mod):
    y = 1
    base = n
    tmp = m
    while tmp != 0:
        if tmp % 2 == 1:
            y *= base
            if modulo > 0:
                y %= modulo
        base *= base
        if modulo > 0:
            base %= modulo
        tmp //= 2
    return y

def inved(a, modulo=mod):
    x, y, u, v, k, l = 1, 0, 0, 1, a, modulo
    while l != 0:
        x, y, u, v = u, v, x - u * (k // l), y - v * (k // l)
        k, l = l, k % l
    return x % modulo

fact = [1 for _ in range(maxf+1)]
invf = [1 for _ in range(maxf+1)]

for i in range(maxf):
    fact[i+1] = (fact[i] * (i+1)) % mod
invf[-1] = inved(fact[-1])
for i in range(maxf, 0, -1):
    invf[i-1] = (invf[i] * i) % mod

for i in range(1, n+2):
  S = fact[n]*invf[i-1]*invf[n-i+1]%mod
  if i <= n-1:
    S += fact[n-1]*invf[i]*invf[n-1-i]%mod
    S %= mod
  if i <= n-M:
    S -= fact[n-1-M]*invf[i-1]*invf[n-M-i]%mod
    S %= mod
  if i <= n:
    S += fact[n-1]*invf[i-1]*invf[n-i]%mod
    S %= mod
  print(S)

from collections import Counter

class Combination:
    def __init__(self, size):
        self.size = size + 2
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % MOD
            self.inv[i] = -self.inv[MOD % i] * (MOD // i) % MOD
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % MOD

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % MOD

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % MOD) % MOD

    def nhr(self, n, r):  # 重複組合せ: x_1 + ... + x_n = r
        return self.ncr(n + r - 1, n - 1)

N = int(input())
A = list(map(int, input().split()))
MOD = 10**9 + 7
comb = Combination(N + 100)

cntA = Counter(A)
X = [a for a, c in cntA.items() if c == 2][0]
l, r = [i for i, a in enumerate(A) if a == X]

ans = [N]
for leng in range(2, N + 2):
    M = comb.ncr(N + 1, leng)

    L = l + (N - r)
    D = comb.ncr(L, leng - 1)
    ans.append((M - D) % MOD)

print(*ans, sep='\n')


#!/usr/bin/env python3
import sys
from collections import Counter 
MOD = 1000000007 


def solve(n: int, a: "List[int]"):
    counter = Counter(a).most_common()
    twiceValue = counter[0][0]
    first_index = None
    second_index = None

    for i in range(n+1):
        if a[i] == twiceValue:
            if first_index == None:
                first_index = i
            else:
                second_index = i

    # 1つ目のtwiceValueより左にある数字の数  
    left = first_index

    # 2つ目のtwiceValueより右にある数字の数  
    right = n-second_index
    edge = left+right

    # nCk,edgeCkをO(1)で取れるようにするため
    combination_table = {n+1: [0]*(n+2), edge: [0]*(edge+1)}
    
    combination_table[n+1][0] = 1
    combination_table[n+1][n+1] = 1
    combination_table[edge][0] = 1
    combination_table[edge][edge] = 1
    c_value = 1

    # nCkをうめる
    for i in range(1,n+1):
        c_value *= (n+1 + 1 - i) * pow(i,MOD-2,MOD)
        c_value %= MOD
        combination_table[n+1][i] = c_value

    c_value = 1
    # edgeCkをうめる
    for i in range(1,edge):
        c_value *= (edge + 1 - i) * pow(i,MOD-2,MOD)
        c_value %= MOD
        combination_table[edge][i] = c_value

    for i in range(1,n+2):
        if i-1 <= edge:
            value = combination_table[n+1][i] - combination_table[edge][i-1]
        else:
            value = combination_table[n+1][i]
        print((value%MOD))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    n = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(n + 1)]  # type: "List[int]"
    solve(n, a)

def __starting_point():
    main()

__starting_point()

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7


duplicate_x = None
checked = set()
for a in A:
    if a in checked:
        duplicate_x = a
    checked.add(a)


x_l_index = A.index(duplicate_x)
x_r_index = N + 1 - A[::-1].index(duplicate_x) - 1


# 逆元の前計算
factorial = [1, 1]
inverse = [1, 1]
invere_base = [0, 1]
for i in range(2, N + 2):
    factorial.append((factorial[-1] * i) % MOD)
    invere_base.append((-invere_base[MOD % i] * (MOD // i)) % MOD)
    inverse.append((inverse[-1] * invere_base[-1]) % MOD)


def nCr(n, r):
    if not 0 <= r <= n:
        return 0
    return factorial[n] * inverse[r] * inverse[n - r] % MOD


for k in range(1, N + 1 + 1):
    print(((nCr(N + 1, k) - nCr(max(0, x_l_index) + max(N + 1 - x_r_index - 1, 0), k - 1)) % MOD))


m = 10**9+7
N = int(input())
A = list(map(int,input().split()))
B = (N+1)*[0]

for n in range(N+1):
  if B[A[n]]==0:
    B[A[n]]=n+1
  else:
    S = B[A[n]]+N-n-1
    break

p = 1
q = 1

for n in range(1,N+2):
  p = ((p*(N+2-n))*pow(n,m-2,m))%m
  q = (1 if n==1 and S>=n-1 else(0 if S<n-1 else ((q*(S-n+2))*pow(n-1,m-2,m)))%m)
  print((p-q)%m)

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

MOD = 10 ** 9 + 7

def cmb(n, k):
    if k > n:
        return 0
    return fact[n] * fact_inv[k] % MOD * fact_inv[n-k] % MOD

def cumprod(arr, MOD):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq)
    for n in range(1, Lsq):
        arr[:, n] *= arr[:, n-1]; arr[:, n] %= MOD
    for n in range(1, Lsq):
        arr[n] *= arr[n-1, -1]; arr[n] %= MOD
    return arr.ravel()[:L]

def make_fact(U, MOD):
    x = np.arange(U, dtype=np.int64); x[0] = 1
    fact = cumprod(x, MOD)
    x = np.arange(U, 0, -1, dtype=np.int64); x[0] = pow(int(fact[-1]), MOD-2, MOD)
    fact_inv = cumprod(x, MOD)[::-1]
    return fact, fact_inv

U = 10 ** 5 + 10 # 階乗テーブルの上限
fact, fact_inv = make_fact(U, MOD)

N = ir()
A = lr()
double = 0
used = set()
for i, a in enumerate(A):
    if a in used:
        double = a
        index_back = i
        break
    used.add(a)

index_front = A.index(double)
x = N + 1 - (index_back - index_front)
print(N)
for i in range(2, N+1):
    answer = cmb(N+1, i) - cmb(x-1, i-1)
    print((answer % MOD))

print((1))
# 10


"""
被りなし
cmb(n-2,k)
被りあり2子使うなら
  x,x,x, A, y,y,y,y, A, z,z,z
cmb(n-2,k-2)
被りあり、１つだけ使うなら。。。
  cmb(n-2,k-1) * 2 # y使うかもしれないけーす
  cmb(count(x) + count(z), k-1) # y使わないケース（２倍カウントしてる）
"""
N = int(input())
A = list(map(int, input().split()))
dup = sum(A) - N*(N+1)//2
idx = []
for i in range(len(A)):
  if A[i] == dup:
    idx.append(i)
    
countXZ = N - idx[1] + idx[0]
### nCr mod
# https://qiita.com/derodero24/items/91b6468e66923a87f39f
mod = 10**9+7 #出力の制限
NMAX = 10**5+10
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

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

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

# solve
print(N) # k=1
for k in range(2,N+1):
  wk = cmb(N-1,k)
  wk += cmb(N-1,k-2)
  wk += cmb(N-1,k-1) * 2
  wk -= cmb(countXZ, k-1)
  #print(cmb(N-1,k), cmb(N-1,k-2), cmb(N-1,k-1) * 2, cmb(countXZ, k-1))
  print(wk % mod)
print(1) # k=N+1

from collections import Counter
mod = 10 ** 9 + 7


class Combination:
    def __init__(self, N, MOD=10 ** 9 + 7):
        self.MOD = MOD
        self.fact, self.inv = self._make_factorial_list(N)

    def __call__(self, n, k):
        if k < 0 or k > n:
            return 0
        res = self.fact[n] * self.inv[k] % self.MOD
        res = res * self.inv[n - k] % self.MOD
        return res

    def _make_factorial_list(self, N):
        fact = [1] * (N + 1)
        inv = [1] * (N + 1)
        MOD = self.MOD
        for i in range(1, N + 1):
            fact[i] = (fact[i - 1] * i) % MOD
        inv[N] = pow(fact[N], MOD - 2, MOD)
        for i in range(N, 0, -1):
            inv[i - 1] = (inv[i] * i) % MOD
        return fact, inv


def __starting_point():
    N = int(input())
    A = list(map(int, input().split()))
    comb = Combination(N + 10)
    X = Counter(A).most_common()[0][0]

    l = A.index(X)
    r = A.index(X, l+1)
    LR = l + (N - r)

    for i in range(1, N + 2):
        ans = comb(N + 1, i)
        ans -= comb(LR, i - 1)
        ans = (ans + mod) % mod

        print(ans)
__starting_point()

g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
MOD = 10**9+7
for i in range(2, 10**5+10):
    g1.append((g1[-1] * i) % MOD)
    inverse.append((-inverse[MOD % i] * (MOD // i)) % MOD)
    g2.append((g2[-1] * inverse[-1]) % MOD)

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

N = int(input())
A = map(int, input().split())
d = {}
n1 = n2 = -1
for i, a in enumerate(A):
  if a in d:
    n1 = N - i
    n2 = d[a]
    break
  d[a] = i

ans = [0] * (N+1)
for k in range(1, N+2):
  ans[k-1] = (comb(N+1, k) - comb(n1+n2, k-1)) % MOD

print(*ans, sep='\n')

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 = 10**5+5
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 )
    
n=int(input())
A=list(map(int,input().split()))
a=sum(A)-n*(n+1)//2
B=[]
for i in range(n+1):
  if A[i]==a:
    B.append(i)
for k in range(1,n+2):
  print((cmb(n-1,k,mod)+2*cmb(n-1,k-1,mod)-cmb(n-B[1]+B[0],k-1,mod)+cmb(n-1,k-2,mod))%mod)

n=int(input())
a=list(map(int,input().split()))
l=[None]*(n+1)
for i in range(n+1):
    if l[a[i]]==None:
        l[a[i]]=i
    else:
        p=l[a[i]]+n-i
        break
pr=10**9+7
print(n)
MAX_NUM = 10**5 + 2
fac  = [0 for _ in range(MAX_NUM)]
finv = [0 for _ in range(MAX_NUM)]
inv  = [0 for _ in range(MAX_NUM)]
fac[0]  = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1
for i in range(2,MAX_NUM):
    fac[i] = fac[i-1] * i % pr
    inv[i] = pr - inv[pr%i] * (pr // i) % pr
    finv[i] = finv[i-1] * inv[i] % pr
def c(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n-k] % pr) % pr
for i in range(2,n+1):
    t=c(n+1,i)
    if p>=i-1:
        t-=c(p,i-1)
    print(t%pr)
print(1)

from collections import Counter

mod = 10**9+7
rng = 100002
fctr = [1]
finv = [1]
for i in range(1,rng):
  fctr.append(fctr[-1]*i%mod)
for i in range(1,rng):
  finv.append(pow(fctr[i],mod-2,mod))
def cmb(n,k):
  if n<=0 or k<0 or n<k:
    return 0
  else:
    return fctr[n]*finv[n-k]*finv[k]%mod

n = int(input())
a = list(map(int,input().split()))
same = []
c = Counter(a)
x = c.most_common()[0][0]
for i in range(n+1):
  if a[i] == x:
    same.append(i+1)
y = same[1]-same[0]+1
print(n)
for k in range(2,n+2):
  print(((cmb(n+1,k)-cmb(n+1-y,k-1))%mod))


n = int(input()) + 1
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

# 1を一つだけ選ぶやつは重複する可能性
d = [False] * (n + 1)

left = right = 0
for i in range(n):
    if d[a[i]]:
        right = i
        left = a.index(a[i])
        break
    d[a[i]] = True


fac = [1] * (n + 1)
for i in range(1, n + 1):
    fac[i] = fac[i - 1] * i % mod


def inv(x):
    return pow(x, mod - 2, mod)


def c(n, k):
    if n < 0 or k < 0 or n < k:
        return 0
    return fac[n] * inv(fac[n - k] * fac[k] % mod) % mod


left_len = left
right_len = n - right - 1
print((n - 1))
for i in range(2, n + 1):
    ans = c(n, i) - c(left_len + right_len, i - 1)
    print((ans % mod))


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)))


n,*a=map(int,open(0).read().split());b={};M=10**9+7;p=n+1;q=r=1
for i,x in enumerate(a):
 if x in b:d=i-b[x];break
 b[x]=i
for k in range(n+1):print((p-q)%M);q=q*(n-d-k)*r%M;r=pow(k+2,M-2,M);p=p*(n-k)*r%M

n = int(input())
l = list(map(int,input().split()))
l1 = [[l[i],i] for i in range(n+1)]
l1.sort()
for i in range(n):
    if l1[i][0] == l1[i+1][0]:
        a,b = l1[i][1],l1[i+1][1]

m = b-a+1
k = n-m+1

mod = 10**9+7 
fact = [1,1]
finv = [1,1]
inv = [0,1]
 
for i in range(2,n+5):
    fact.append((fact[-1]*i)%mod)
    inv.append((inv[mod%i]*(mod-mod//i))%mod)
    finv.append((finv[-1]*inv[-1])%mod)
 
def nCr(n,r,mod):
    if r > n:
        return 0
    else: 
        return fact[n]*finv[r]*finv[n-r]%mod


for i in range(1,n+2):
    a = nCr(n+1,i,mod) -nCr(k,i-1,mod)
    
    print(a%mod)

n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7

"""
どこかに同じ数値が出てくる。
AAAxBBBxCCC
xが同一文字とする
・xがどちらか1つ登場
・Bを使用しない
ものについてはどちらのxを使用しても同じ数列になるので除く
"""
modp = mod
max_n = 2*10 ** 5               # 必要分だけ用意する
fact = [1, 1] + [0]*max_n     # fact[n] = (n! mod modp)
factinv = [1, 1] + [0]*max_n  # factinv[n] = ((n!)^(-1) mod modp)
inv = [0, 1] + [0]*max_n      # factinv 計算用

def cmb(n, r, p):
    assert n < p, 'n is less than modp'
    assert n < max_n, 'n in less than max_n'
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

for i in range(2, max_n + 1):
    fact[i] = (fact[i-1] * i) % modp
    inv[i] = (-inv[modp % i] * (modp // i)) % modp
    factinv[i] = (factinv[i-1] * inv[i]) % modp

counter = [0] * n
for i in range(n+1):
    counter[a[i]-1]+=1
    if counter[a[i]-1] == 2:
        second = i
        first = a.index(a[i])
        break

# xの重複を考慮せず全てカウント
ans = [cmb(n+1, i, mod) for i in range(1, n+2)]

n_left = first
n_right = n-second
n_lr = n_left + n_right

# i個の重複する組合せはn_lrからi-1個選び、xをどちらか1つ選ぶ。
doubled = [1]+[cmb(n_lr, i, mod) for i in range(1, n_lr+1)]

for i in range(n_lr+1):
    ans[i] = (ans[i] - doubled[i])%mod

for i in range(len(ans)):
    print((ans[i]))






import sys
from collections import Counter

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    A = list(map(int, input().split()))
    D = Counter(A)

    for k, v in list(D.items()):
        if v == 2:
            db = k
            break

    flg = 1
    right, left = 0, 0
    for i in range(n + 1):
        if flg and A[i] == db:
            left = i
            flg ^= 1
        elif A[i] == db:
            right = i
            break

    length = n - (right - left)

    # 二項係数(mod p)をO(1)で求める
    def cmb(n, r, mod):
        if (r < 0) or (n < r):
            return 0
        r = min(r, n - r)
        return fact[n] * factinv[r] * factinv[n - r] % mod

    fact = [1, 1]
    factinv = [1, 1]
    inv = [0, 1]

    for i in range(2, n + 2):
        fact.append((fact[-1] * i) % mod)
        inv.append((-inv[mod % i] * (mod // i)) % mod)
        factinv.append((factinv[-1] * inv[-1]) % mod)

    def cmb_mod(n, r, mod):
        x, y = 1, 1
        for i in range(r):
            x = (x * (n - i)) % mod
            y = (y * (i + 1)) % mod
        return (x * pow(y, mod - 2, mod)) % mod

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


def __starting_point():
    resolve()

__starting_point()

import sys
finput=lambda:sys.stdin.readline().strip()

def main():
    p=10**9+7
    n=int(finput())
    a=list(map(int,finput().split()))
    k=sum(a)-(n*(n+1))//2
    pk=[i for i in range(n+1) if a[i]==k]
    fact=[1]*(n+2)
    ifact=[1]*(n+2)
    for i in range(1,n+2):
        fact[i]=fact[i-1]*i % p
    a=fact[-1]
    inv=1
    m=p-2
    while m>0:
        if m&1:
            inv=a*inv % p
        m>>=1
        a=a*a % p
    ifact[-1]=inv
    for i in range(n+1,0,-1):
        ifact[i-1]=ifact[i]*i % p
    ans0=[0]*(n+2)
    ans1=[0]*(n+2)
    ans2=[0]*(n+2)
    for i in range(n):
        ans0[i]=fact[n-1]*ifact[n-i-1]*ifact[i]%p
        ans1[i+1]=ans0[i]*2
        ans2[i+2]=ans0[i]
    sn=pk[0]+n-pk[1]
    for i in range(sn+1):
        ans1[i+1]-=fact[sn]*ifact[sn-i]*ifact[i] % p
    for i in range(1,n+2):
        print(((ans0[i]+ans1[i]+ans2[i]) % p))

def __starting_point():
    main()

__starting_point()

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
a = inpl()
s = set()
for i in range(n+1):
    if a[i] in s:
        last = n-i
        t = a[i]
        break
    s.add(a[i])
for i in range(n+1):
    if a[i] == t:
        fir = i
        break 
soto = fir + last
class Combination:
    """
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

comb = Combination(2*10**5+10)

for i in range(1,n+2):
    rm = 0
    if i <= soto+1:
        rm = comb(soto,i-1)
    print(((comb(n+1,i) - rm)%mod))


from collections import Counter, defaultdict

class Combination:
    def __init__(self, size, mod=10**9 + 7):
        self.size = size + 2
        self.mod = mod
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % self.mod
            self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.mod

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

    def nhr(self, n, r):  # 重複組合せ
        return self.ncr(n + r - 1, n - 1)

    def factN(self, n):
        if n < 0:
            return 0
        return self.fact[n]

N = int(input())
A = list(map(int, input().split()))
MOD = 10**9 + 7
comb = Combination(N + 100)

cntA = Counter(A)
I = [a for a, c in list(cntA.items()) if c == 2][0]
L, R = [i for i, a in enumerate(A) if a == I]
S = L + (N - R)

for i in range(1, N + 2):
    if i == 1:
        print(N)
        continue

    ans = comb.ncr(N + 1, i) - comb.ncr(S, i - 1)
    print((ans % MOD))


n = int(input())
a = list(map(int, input().split()))
mod = pow(10, 9) + 7
num = [-1] * (n + 1)
for i in range(n + 1):
    if num[a[i]] == -1:
        num[a[i]] = i
    else:
        samei, samej = num[a[i]], i
        break
x = n + samei - samej
same = 1
comb = n + 1
print(comb - 1)
for i in range(2, n + 2):
    comb = (comb * (n - i + 2) * pow(i, mod - 2, mod)) % mod
    if i - 1 <= x:
        same = (same * (x - i + 2) * pow(i - 1, mod - 2, mod)) % mod
    else:
        same = 0
    print((comb - same) % mod)

mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
c=[0]*n
for i in a:c[i-1]+=1
ind=c.index(2)
x=[]
for i in range(n+1):
    if a[i]==ind+1:x.append(i)
m=n+x[0]-x[1]
f=[1]
for i in range(1,n+2):f.append(f[-1]*i%mod)
def comb(n,r):return f[n]*pow(f[r],mod-2,mod)*pow(f[n-r],mod-2,mod)%mod
for k in range(1,n+2):
    if k==1:print(n);continue
    if k-1>m:print(comb(n+1,k));continue
    ans=comb(n+1,k)-comb(m,k-1)
    print(ans%mod)

class nCrMod():
    def __init__(self, mod):
        self.mod = mod
        self.fac = [1, 1]
        self.finv = [1, 1]
        self.inv = [0, 1]

    def prep(self, n):
        mod = self.mod
        f, fi = self.fac[-1], self.finv[-1]
        for i in range(len(self.fac), n + 1):
            fn = f * i % mod
            v = -self.inv[mod % i] * (mod // i) % mod
            fin = fi * v % mod
            f, fi = fn, fin
            self.fac.append(f)
            self.finv.append(fi)
            self.inv.append(v)

    def __call__(self, n, r):
        if len(self.fac) <= n:
            self.prep(n)
        return self.fac[n] * self.finv[r] * self.finv[n - r] % self.mod

def main():
    N = int(input())
    A = list(map(int, input().split()))
    d = {}
    f, s = 0, 0
    for i, a in enumerate(A):
        if a in d:
            break
        d[a] = i
    f, s = d[a], i
    mod = 10**9 + 7
    nCr = nCrMod(mod)
    for i in range(1, N + 2):
        if i > N + 1 - (s - f):
            print((nCr(N + 1, i)))
        else:
            print(((nCr(N + 1, i) - nCr(N - (s - f), i - 1)) % mod))
main()


from collections import Counter
n = int(input())
a = list(map(int,input().split()))
kasanari = Counter(a).most_common()[0][0]
mod = 10**9+7
"""
2 3 1 4 5 6 1 7 8 9
Y Y C C C C C X X X
k個選ぶ. 全部 nCk-3Ck
"""
basho = []
for cnt, i in enumerate(a):
	if i == kasanari:
		basho.append(cnt)

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

N = 2*10**5  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, N+1):
	fact.append((fact[-1]*i)%mod)
	inv.append((-inv[mod%i]*(mod//i))%mod)
	factinv.append((factinv[-1]*inv[-1])%mod)

for i in range(1, n+2):
	print((cmb(n+1, i, mod)-cmb(n-basho[1]+basho[0], i-1, mod))%mod)

import collections

mod=10**9+7
n=int(input())
arr=list(map(int,input().split()))
cnt=collections.Counter(arr)
for key in cnt.keys():
  if cnt[key]==2:
    K=key
pos1=-1
pos2=-1
for i in range(n+1):
  if arr[i]==K:
    if pos1==-1:
      pos1=i
    else:
      pos2=i
A=pos1
B=pos2-pos1-1
C=n-pos2
facts=[1]
for i in range(1,n+1):
  facts.append((facts[-1]*i)%mod)
revfacts=[1]
for i in range(1,n+1):
  revfacts.append(pow(facts[i],mod-2,mod))
ans=[]
for i in range(1,n+2):
  ways1=0
  if i<=A+B+C:
    ways1=(facts[A+B+C]*revfacts[i]*revfacts[A+B+C-i])%mod
  ways2=0
  if i>=2 and i-2<=A+B+C:
  	ways2=(facts[A+B+C]*revfacts[i-2]*revfacts[A+B+C-(i-2)])%mod
  ways3=0
  if i>=1 and i-1<=A+C:
    ways3=(facts[A+C]*revfacts[i-1]*revfacts[A+C-(i-1)])%mod
  ways4=0
  if i>=1 and i-1<=A+B+C:
    ways4=(2*facts[A+B+C]*revfacts[i-1]*revfacts[A+B+C-(i-1)]-2*ways3)%mod
  ans.append((ways1+ways2+ways3+ways4)%mod)
for val in ans:
  print(val)

class Calc:
    def __init__(self, max_value, mod):
        """combination(max_value, all)"""
        fact = [-1] * (max_value + 1)
        fact[0] = 1
        fact[1] = 1
        for x in range(2, max_value + 1):
            fact[x] = x * fact[x - 1] % mod

        invs = [1] * (max_value + 1)
        invs[max_value] = pow(fact[max_value], mod - 2, mod)
        for x in range(max_value - 1, 0, -1):
            invs[x] = invs[x + 1] * (x + 1) % mod

        self.fact = fact
        self.invs = invs
        self.mod = mod

    def nCr(self, n, r):
        r = min(n - r, r)
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        return self.fact[n] * self.invs[r] * self.invs[n - r] % self.mod

    def nHr(self, n, r):
        return self.nCr(n - 1 + r, r)


def main():
    MOD = 10 ** 9 + 7

    N = int(input())
    A = map(int, input().split())

    B = [-1] * (N + 1)  # はじめて出現する位置(0-ind)
    d = None  # 重複要素の出現位置(2点)
    for i, x in enumerate(A):
        if ~B[x]:
            d = B[x], i
            break
        B[x] = i

    # 重複要素L,R(d[0],d[1]),一度だけ出現する数の列X,Y,Z(|X|>=0,|Y|>=0,|Z|>=0)
    # X...LY...RZ...
    # 重複計上: choose(N+1,K)
    # ここから重複分を差し引く
    # LRを含む個数
    # 0個: 重複計上なし
    # 1個: (X,L,YZ)と(XY,R,Z)が一致する場合に重複計上になる==(X,L/R,Z)
    # ->
    # #==sum(choose(X,a)*choose(Z,K-1-a)),(0<=a<=K-1)
    # 見方を変える
    # Yの区間以外からK個選ぶ
    # ただし,Yの区間外のうちLRから0個取るものと2個取るものを差し引く
    # 残りは(X,L/R,Z)を二重計上したものなので,半分にする
    # (choose(N+1-Y,K) - choose(N+1-2-Y,K) - choose(N+1-2-Y,K-2)) // 2
    # 2個: 重複計上なし

    calc = Calc(max_value=N + 1, mod=MOD)
    ans = []
    Y = d[1] - 1 - d[0]
    div2 = pow(2, MOD - 2, MOD)
    for k in range(1, N + 2):
        t = (
                    calc.nCr(N + 1, k)
                    - (
                            calc.nCr(N + 1 - Y, k)
                            - calc.nCr(N + 1 - 2 - Y, k)
                            - calc.nCr(N + 1 - 2 - Y, k - 2)
                    ) * div2 % MOD
            ) % MOD
        ans.append(t)

    print(*ans, sep='\n')


def __starting_point():
    main()

__starting_point()

mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
place=[-1]*n
for i in range(n+1):
	if place[a[i]-1]==-1:
		place[a[i]-1]=i
	else:
		R=(place[a[i]-1],i)
		break
def c(a,b):
	if a==b==0:
		return 1
	if a<b or a<=0 or b<0:
		return 0
	r=fac[a-b]*fac[b]%mod
	return fac[a]*pow(r,mod-2,mod)%mod
fac=[1]
for i in range(n+1):
	fac.append(fac[-1]*(i+1)%mod)
for i in range(1,n+2):
	ans=(c(n+1,i)-c(R[0]+n-R[1],i-1))%mod
	print(ans)

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)

def cmb(n, r, p):
	if (r<0) or (n<r):
		return 0
	r=min(r, n-r)
	return fact[n]*factinv[r]*factinv[n-r]%p

p=10**9+7
N=10**6
fact=[1,1]
factinv=[1,1]
inv=[0,1]

for i in range(2, N+1):
	fact.append((fact[-1]*i)%p)
	inv.append((-inv[p%i]*(p//i)%p))
	factinv.append((factinv[-1]*inv[-1])%p)


N=int(input())
A=list(map(int,input().split()))
index=[-1]*N
for i,a in enumerate(A):
    if index[a-1]!=-1:
        dup_first,dup_second=index[a-1],i
        break
    index[a-1]=i

mod=10**9+7
n=dup_first
m=N-dup_second
l=n+m
for k in range(1,N+2):
    if k==1:
        print(N)
        continue
    ans=(cmb(N+1,k,mod)-cmb(l,k-1,mod))%mod
    print(ans)

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 = 10**5 + 1 # N >= n
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 )

n = int(input())
A = list(map(int,input().split()))

val = sum(A) - sum(set(A))
i = -1
j = -1
for k in range(n+1):
    if A[k] == val:
        if i == -1:
            i = k
        elif j == -1:
            j = k
            break
for k in range(1,n+2):
    print((cmb(n+1, k, mod) - cmb(n + i - j, k - 1, mod)) % mod)

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

g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
mod = 10 ** 9 + 7

n = int(input())
lis = list(map(int,input().split()))
li = [-1] * n

for i in range( 2, n + 2 ):
    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(n+1):
    if li[lis[i]-1] != -1:
        left = li[lis[i]-1]+1
        right = i+1
        break
    else:li[lis[i]-1] = i

for k in range(1,n+2):
  #     print(nCr(n+1,k,mod),nCr(left+n-right,k-1,mod))
    ans = cmb(n+1,k,mod)-cmb(left+n-right,k-1,mod)
    if ans < 0:
        ans += mod
    print(ans)

class Calc:
    def __init__(self, max_value, mod):
        """combination(max_value, all)"""
        fact = [-1] * (max_value + 1)
        fact[0] = 1
        fact[1] = 1
        for x in range(2, max_value + 1):
            fact[x] = x * fact[x - 1] % mod

        invs = [1] * (max_value + 1)
        invs[max_value] = pow(fact[max_value], mod - 2, mod)
        for x in range(max_value - 1, 0, -1):
            invs[x] = invs[x + 1] * (x + 1) % mod

        self.fact = fact
        self.invs = invs
        self.mod = mod

    def nCr(self, n, r):
        r = min(n - r, r)
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        return self.fact[n] * self.invs[r] * self.invs[n - r] % self.mod

    def nHr(self, n, r):
        return self.nCr(n - 1 + r, r)


def main():
    MOD = 10 ** 9 + 7

    N = int(input())
    A = map(int, input().split())

    B = [-1] * (N + 1)  # はじめて出現する位置(0-ind)
    d = None  # 重複要素の出現位置(2点)
    for i, x in enumerate(A):
        if ~B[x]:
            d = B[x], i
            break
        B[x] = i

    # 重複要素L,R(d[0],d[1]),一度だけ出現する数の列X,Y,Z(|X|>=0,|Y|>=0,|Z|>=0)
    # X...LY...RZ...
    # 重複計上: choose(N+1,K)
    # ここから重複分を差し引く
    # LRを含む個数
    # 0個: 重複計上なし
    # 1個: (X,L,YZ)と(XY,R,Z)が一致する場合に重複計上になる==(X,L/R,Z)
    # ->
    # #==sum(choose(X,a)*choose(Z,K-1-a)),(0<=a<=K-1)
    # 見方を変える
    # Yの区間以外からK個選ぶ
    # ただし,Yの区間外のうちLRから0個取るものと2個取るものを差し引く
    # 残りは(X,L/R,Z)を二重計上したものなので,半分にする
    # (choose(N+1-Y,K) - choose(N+1-2-Y,K) - choose(N+1-2-Y,K-2)) // 2
    # <editorial>
    # LRから1個,XZからK-1個取るchoose(XZ,K-1)=choose(N+1-2-Y,K-1)でよい
    # 2個: 重複計上なし

    calc = Calc(max_value=N + 1, mod=MOD)
    ans = []
    Y = d[1] - 1 - d[0]
    for k in range(1, N + 2):
        ans.append((calc.nCr(N + 1, k) - calc.nCr(N + 1 - 2 - Y, k - 1)) % MOD)

    print(*ans, sep='\n')


def __starting_point():
    main()

__starting_point()

n = int(input())
A =list(map(int, input().split()))
mod = 10**9+7

d = {}
for i in range(n+1):
    if A[i] not in d:
        d[A[i]] = i
    else:
        l = d[A[i]]
        r = i
        break
#print(l, r)

def cmb1(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 = 10**6
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 k in range(1, n+2):
    ans = cmb1(n+1, k, mod) - cmb1(l+n-r, k-1, mod)
    print((ans%mod))


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)

def __starting_point():
  main()
__starting_point()

n=int(input())
a=list(map(int,input().split()))
d=dict()
#コンビネーション逆元
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 = 10**6
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(n+1):
    if a[i] not in d:
        d[a[i]]=i
    else:
        idx1=d[a[i]]
        idx2=i
        break
for i in range(1,n+2):
    ans=cmb(n+1,i,mod)
    if n-idx2+idx1<i-1:
        print(ans)
    else:
        ans=(ans-cmb(n-idx2+idx1,i-1,mod)+mod)%mod
        print(ans%mod)

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 list(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))



n=int(input())
a=list(map(int,input().split()))
mod=pow(10,9)+7
#ans=[int(input()) for _ in range(n+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
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1]
for i in range( 2, n + 2 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
# 二つあるやつの左の方の左にl個、右のやつの右のほうにr個数字がある
f=[-1]*(n+1)
l,r=0,0
for i in range(n+1):
  ai=a[i]
  if f[ai]==-1:
    f[ai]=i
  else:
    l=f[ai]
    r=n-i
    break
for k in range(1,n+2):
  a=cmb(n+1,k,mod)
  if l+r>=k-1:
	  a-=cmb(l+r,k-1,mod)
  #print(a==ans[k-1],a,ans[k-1])
  print(a%mod)

def memfact(a,m):
    temp = 1
    yield temp
    for i in range(1,a+1):
        temp = temp * i % m
        yield temp
def comb(n,r,m):
    if r == 0: return 1
    return (memf[n]*pow(memf[r],m-2,m)*pow(memf[n-r],m-2,m)) % m


n,*a = map(int, open(0).read().split())
m = 1000000007
checker = set()
for i in range(n+1):
    if a[i] in checker:
        left = a.index(a[i])
        right = n - i
        break
    else:
        checker.add(a[i])
memf = []
mfappend = memf.append
for x in memfact(n+1,m):
    mfappend(x)
lr = left + right
for i in range(1,n+2):
    ans = comb(n+1,i,m)
    if i <= lr + 1:
        ans = (ans-comb(lr,i-1,m)) % m
    print(ans)

from math import factorial

n = int(input())
a = list(map(int,input().split()))
se = set()
mod = 10**9+7

for i,j in enumerate(a):
    if j in se:
        two = i
    else:
        se.add(j)

one = a.index(a[two])

def prepare(n, MOD):
    facts = [1]*(n+1)
    for i in range(1, n+1):
        facts[i] = facts[i-1]*i%MOD
    invs = [1]*(n+1)
    invs[n] = pow(facts[n], MOD-2, MOD)
    for i in range(0, n)[::-1]:
        invs[i] = invs[i+1] * (i+1) % MOD
    return facts, invs

facts,invs = prepare(n+1,mod)

def make_combi(facts,invs,n,r,mod):
    return facts[n] * invs[r] * invs[n - r] %mod

for i in range(1,n+2):
    point = make_combi(facts,invs,n+1,i,mod)
    if one+n-two >= i-1:
        point -= make_combi(facts,invs,one+n-two,i-1,mod)
    print(point%mod)

from collections import Counter


class Combination:
    def __init__(self, N, MOD=10 ** 9 + 7):
        self.MOD = MOD
        self.fact, self.inv = self._make_factorial_list(N)

    def __call__(self, n, k):
        if k < 0 or k > n:
            return 0
        res = self.fact[n] * self.inv[k] % self.MOD
        res = res * self.inv[n - k] % self.MOD
        return res

    def _make_factorial_list(self, N):
        fact = [1] * (N + 1)
        inv = [1] * (N + 1)
        MOD = self.MOD
        for i in range(1, N + 1):
            fact[i] = (fact[i - 1] * i) % MOD
        inv[N] = pow(fact[N], MOD - 2, MOD)
        for i in range(N, 0, -1):
            inv[i - 1] = (inv[i] * i) % MOD
        return fact, inv


def __starting_point():
    N = int(input())
    A = tuple(map(int, input().split()))
    mod = 10 ** 9 + 7

    X = Counter(A).most_common()[0][0]
    left = A.index(X)
    right = A[::-1].index(X)
    LR = left + right

    comb = Combination(10 ** 5 + 10)

    ans = []
    for i in range(1, N + 2):
        val = comb(N+1, i)-comb(LR, i-1)
        val = (val + mod) % mod
        ans.append(val)

    print(*ans, sep="\n")

__starting_point()

# D - 11

n = int(input())
a = list(map(int, input().split()))
MOD = 10**9 + 7

# a//b (MOD p)
def div_mod(a, b, p):
    return (a * pow(b, p-2, p)) % p

factorial_memo = [1]
for i in range(1, n+2):
    factorial_memo.append((factorial_memo[-1] * i) % MOD)

def comb_mod(n, r, mod):
    if n < r:
        return 0
    return div_mod(div_mod(factorial_memo[n], factorial_memo[n-r], mod), factorial_memo[r], mod)


indices = [-1] * (n+1)
for i in range(n+1):
    if indices[a[i]] == -1:
        indices[a[i]] = i
    else:
        f_idx = indices[a[i]]
        s_idx = i
        break

for k in range(1, n+2):
    all_pattern = comb_mod(n+1, k, MOD)
    dup_pattern = comb_mod(f_idx + (n - s_idx), k-1, MOD)
    print((all_pattern - dup_pattern) % MOD)

n, *a = map(int, open(0).read().split())

left = 0
right = 0
val = 0
seen = [False] * (n + 1)
for i in range(n + 1):
    if seen[a[i]]:
        right = i
        val = a[i]
        break
    seen[a[i]] = True
for i in range(n):
    if a[i] == val:
        left = i
        break

mod = 10 ** 9 + 7

fac = [1] * (n + 5)
for i in range(1, n + 3):
    fac[i] = fac[i - 1] * i % mod
def inv(x):
    return pow(x, mod - 2, mod)
def c(n, k):
    if n < k:
        return 0
    return fac[n] * inv(fac[k] * fac[n - k]) % mod

right = n - right
for i in range(1, n + 2):
    print((c(n + 1, i) - c(left  + right, i - 1)) % mod)


from collections import defaultdict
n = int(input()) + 1
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

# 1を一つだけ選ぶやつは重複する可能性
d = defaultdict(int)

left = right = 0
for i in range(n):
    if d[a[i]] > 0:
        right = i
        left = a.index(a[i])
        break
    d[a[i]] += 1


fac = [1] * (n + 1)
for i in range(1, n + 1):
    fac[i] = fac[i - 1] * i % mod


def inv(x):
    return pow(x, mod - 2, mod)


def c(n, k):
    if n < 0 or k < 0 or n < k:
        return 0
    return fac[n] * inv(fac[n - k] * fac[k] % mod) % mod


left_len = left
right_len = n - right - 1
print((n - 1))
for i in range(2, n + 1):
    ans = c(n, i) - (c(left_len + 1 + right_len, i) -
                     c(left_len + right_len, i))
    print((ans % mod))


from collections import Counter
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 = 10**6
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 )
N,*A = map(int, open(0).read().split())
Cnt = Counter(A)
for i in range(1,N+1):
  if Cnt[i]==2:
    p = i
    break
a = A.index(p)
b = A[::-1].index(p)
for i in range(1,N+2):
  print((cmb(N+1,i,mod)-cmb(a+b,i-1,mod))%mod)

n=int(input())
l=list(map(int,input().split()))
cnt=[0 for i in range(n+1)]
mod=10**9+7
fact=[1]*(n+2)
inv=[1]*(n+2)
for i in range(2,n+2):
    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(n+1):
    if cnt[l[i]]:
        r=cnt[l[i]]+n-i;break
    cnt[l[i]]+=i
else:r=n-cnt[l[0]]
for i in range(1,n+2):
    print((comb(n+1,i)-comb(r,i-1))%mod)

MOD = 1000000000+7
n = int(input())
a = list(map(int,input().split()))

count = [0]*n
for i,ai in enumerate(a,1):
    count[ai-1] += 1
    if(count[ai-1] == 2):
        common = a.index(ai) + (n+1-i)
        break

fac = [1]*(n+2)
fac_inv =  [0]*(n+2)

for i in range(n+1):
    fac[i+1] = (fac[i] * (i+1)) %MOD
fac_inv[-1] = pow(fac[-1],MOD-2,MOD)
for i in range(n+1,0,-1):
    fac_inv[i-1] = (fac_inv[i] * i) % MOD

for i in range(1,n+2):
    ans = (fac[n+1] * (fac_inv[i] * fac_inv[n+1-i])%MOD)%MOD
    if common >= i-1:
        ans -= (fac[common] * (fac_inv[i-1] * fac_inv[common - (i-1)])%MOD)%MOD
    print(ans%MOD)

class Factorial():
    def __init__(self,n,mod):
        self.mod = mod
        self.factorial = [0 for _ in range(n+1)]
        self.inv = [0 for _ in range(n+1)]
        self.factorial[0] = 1
        for i in range(n):
            self.factorial[i+1] = self.factorial[i]*(i+1)%mod
        self.inv[n] = pow(self.factorial[n],mod-2,mod)
        for i in range(n)[::-1]:
            self.inv[i] = self.inv[i+1]*(i+1)%mod

    def comb(self,m,k):
        if m-k<0 or k<0: return 0
        return self.factorial[m]*self.inv[k]*self.inv[m-k]%self.mod

MOD = 1000000007

N = int(input())
A = list(map(int,input().split()))

F = Factorial(N+1,MOD)

tmp = [None for _ in range(N)]

for i in range(N+1):
    if tmp[A[i]-1] is None:
        tmp[A[i]-1] = i
    else:
        a = tmp[A[i]-1]
        b = i
        break

A = []

for i in range(1,N+2):
    A.append((F.comb(N-1,i)+F.comb(N-1,i-2)+F.comb(N-1,i-1)*2-F.comb(N+a-b,i-1))%MOD)

print('\n'.join(map(str,A)))

from collections import Counter

U = 10**5+1
MOD = 10**9+7
 
fact = [1]*(U+1)
fact_inv = [1]*(U+1)
 
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 k > n:
        return 0
    z = fact[n]
    z *= fact_inv[k]
    z %= MOD
    z *= fact_inv[n-k]
    z %= MOD
    return z
  
n = int(input())
A = list(map(int, input().split()))
x = Counter(A).most_common()[0][0]
left = A.index(x)
right = A[::-1].index(x)
for k in range(1, n+2):
  ans = comb(n+1, k) - comb(left+right, k-1)
  ans %= MOD
  print(ans)


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))


N=10**5+3
mod=10**9+7
fac=[1]*(N+1)
for i in range(1,N+1):
    fac[i]=fac[i-1]*i%mod
inv_fac=[1]*(N+1)
inv_fac[N]=pow(fac[N],mod-2,mod)
for i in range(N-1,0,-1):
    inv_fac[i]=inv_fac[i+1]*(i+1)%mod
def nCr(n,r):
    if n<0 or r<0 or r>n:
        return 0
    return fac[n]*inv_fac[r]%mod*inv_fac[n-r]%mod
n=int(input())
A=list(map(int,input().split()))
used=[0]*n
for i in range(n+1):
    a=A[i]
    if used[a-1]==0:
        used[a-1]=[1,i]
    else:
        x=a
        y=used[a-1][1]
        z=i
        break
print(n)
for i in range(2,n+2):
    ans=nCr(n+1,i)-nCr(n-z+y,i-1)
    print(ans%mod)

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = LIST()

check = [0]*(n+1)

kaburi = 0
idx1 = 0
idx2 = 0

mod = 10**9 + 7
N = 10**6  # 必要そうな階乗の限界を入れる
factorial = [1]
for i in range(1, N):
    factorial.append(factorial[i-1] * i % mod)
def power(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x % mod
    elif y % 2 == 0:
        return power(x, int(y/2)) ** 2 % mod
    else:
        return power(x, int((y-1)/2)) ** 2 * x % mod
def C(n, r):
    return (((factorial[n] * x_inv[r]) % mod) * x_inv[n-r]) % mod
x_inv = [0] * (N)
x_inv[-1] = power(factorial[-1], mod-2)
for i in range(N-2, -1, -1):
    x_inv[i] = x_inv[i+1] * (i+1) % mod

for i in range(n+1):
	if check[a[i]]:
		kaburi = a[i]
		idx1 = check[a[i]]
		idx2 = i + 1
		break
	check[a[i]] = i + 1

# print(kaburi)
# print(idx1, idx2)
l = idx1-1
r = n-idx2+1
idx1 -= 1
idx2 -= 1

thre = n-(idx2-idx1)+2
# print(l, r)

for k in range(1, n+2):
	if k >= thre:
		print((C(n+1, k)%mod))
	else:
		print(((C(n+1, k)-C(r+l, k-1))%mod))


def build_combination(n, mod):
    def cmb(n, r):
        if r < 0 or n < r:
            return 0
        return (((invs[r] * invs[n - r]) % mod) * fact[n]) % mod

    fact = [1] * (n + 1)
    for x in range(2, n + 1):
        fact[x] = x * fact[x - 1] % mod

    invs = [1] * (n + 1)
    invs[n] = pow(fact[n], mod - 2, mod)
    for x in range(n - 1, 0, -1):
        invs[x] = invs[x + 1] * (x + 1) % mod

    return cmb


def find(a):
    """重複する数値のindexのペアを返す"""
    n = len(a)
    checked = [-1] * (n + 1)
    for i, x in enumerate(a):
        if checked[x] != -1:
            return checked[x], i
        else:
            checked[x] = i
    raise ValueError


def main():
    mod = 10 ** 9 + 7

    n = int(input())
    *a, = list(map(int, input().split()))

    cmb = build_combination(n + 1, mod)

    li, ri = find(a)

    for k in range(1, n + 2):
        ret = (cmb(n + 1, k) - cmb(n + 1 - (ri - li + 1), k - 1)) % mod  # mod忘れ
        print(ret)
        # for j in range(k + 1):
        #     ret -= cmb(li, j) * cmb(n - ri, k - j - 1)
        # PxQxRのPRからk-1個とる
        # PRの取り方の総和を求めるより、区間PRに含まれる総個数からk-1個選ぶ方法を考える


def __starting_point():
    main()

__starting_point()

from collections import Counter

U = 10**5+1
MOD = 10**9+7
 
fact = [1]*(U+1)
fact_inv = [1]*(U+1)
 
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 k > n:
        return 0
    z = fact[n]
    z *= fact_inv[k]
    z %= MOD
    z *= fact_inv[n-k]
    z %= MOD
    return z
  
n = int(input())
A = list(map(int, input().split()))
x = Counter(A).most_common()[0][0]
left = A.index(x)
right = A[::-1].index(x)
print(n)
for k in range(2, n+2):
  ans = comb(n+1, k) - comb(left+right, k-1)
  ans %= MOD
  print(ans)

from collections import Counter

n = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

MAX = 10 ** 5 + 10

fact = [1] * (MAX + 1)
for i in range(1, MAX + 1):
    fact[i] = (fact[i-1] * i) % mod

inv = [1] * (MAX + 1)
for i in range(2, MAX + 1):
    inv[i] = inv[mod % i] * (mod - mod // i) % mod

fact_inv = [1] * (MAX + 1)
for i in range(1, MAX + 1):
    fact_inv[i] = fact_inv[i-1] * inv[i] % mod


def comb(n, r):
    if n < r:
        return 0

    return fact[n] * fact_inv[n-r] * fact_inv[r] % mod


c = Counter(a)
for key, val in list(c.items()):
    if val == 2:
        break

idx = []
for i, e in enumerate(a):
    if e == key:
        idx.append(i)

l = idx[0]
r = n - idx[1]
for k in range(1, n + 2):
    ans = comb(n + 1, k) - comb(l + r, k - 1)
    ans %= mod
    print(ans)


import sys
input=sys.stdin.readline


def solve():
    N = int(input())
    d = {i:-1 for i in range(1, N+1)}
    *l, = list(map(int, input().split()))

    MOD = 10**9+7
    n = N+1
    fac = [1]*(n+1)
    rev = [1]*(n+1)
    
    for i in range(1,n+1):
        fac[i] = i*fac[i-1]%MOD
        rev[i] = pow(fac[i], MOD-2, MOD)
    
    comb = lambda a,b:(fac[a]*rev[a-b]*rev[b])%MOD if a>=b else 0

    for i, j in enumerate(l):
        if d[j] != -1:
            break
        d[j] = i

    v = d[j]+N-i
    for i in range(1, N+2):
        print(((comb(N+1, i)-comb(v, i-1))%MOD))


def __starting_point():
    solve()

__starting_point()

n = int(input())
a = list(map(int, input().split()))

mod = 10 ** 9 + 7
N = 100000

#逆元テーブル
inv_t = [0]+[1]
for i in range(2, N):
  inv_t += [inv_t[mod % i] * (mod - int(mod / i)) % mod]

#階乗計算
kai = [1, 1]
rev_kai = [1, inv_t[1]]
for i in range(2, N):
	kai.append(kai[-1] * i % mod)
	rev_kai.append(rev_kai[-1] * inv_t[i] % mod)

# コンビネーション計算
def cmb(n, r):
    if n < r or n < 0 or r < 0:
        return 0
    else:
        return kai[n] * rev_kai[r] * rev_kai[n-r] % mod

d = {}

# n1個 X n2個 X n3個
n1 = 0
n2 = 0
n3 = 0

for i, ai in enumerate(a):
    if ai not in d:
        d[ai] = i
    else:
        n1 = d[ai]
        n2 = i - d[ai] - 1
        n3 = n - i
        break

for i in range(1, n+2):
    ans = 0
    # Xを選ばない
    ans += cmb(n-1, i)
    # Xを2回選ぶ
    ans += cmb(n-1, i-2)
    # Xを1回選ぶ かつ Xの間からは選ばない
    ans += cmb(n-1-n2, i-1)
    # Xを1回選ぶ かつ Xの間から一つ以上選ぶ
    if i >= 2 and i <= n:
        ans += 2 * (cmb(n2+n1+n3, i-1) - cmb(n1+n3, i-1))

    print((ans % mod))


# 全部違う要素なら、k個から成る部分列の数は単純に (n+1) C kである
# ここである2つが同じ数であった場合、それに寄って同一視される条件はなにか?
# 同じ数を1つだけ含む かつ 2つの間の数を含まない である。
# 2つの外側にある要素の数をjとすると 、j個の中からk-1個を選ぶから j C (k-1)である。
# j < k-1の場合は、同一視されるものは無いので0と見なせばよい。

n = int(input())
nums = list(map(int, input().split()))

max_len = n+5  # 適宜変更する
mod = 10**9 + 7

# 二項係数の左側の数字の最大値を max_len　とする。nとかだと他の変数と被りそうなので。
# factori_table = [1, 1, 2, 6, 24, 120, ...] 要は factori_table[n] = n!
# 計算時間はO(max_len * log(mod))
modinv_table = [-1] * (max_len + 1)
modinv_table[0] = None  # 万が一使っていたときにできるだけ早期に原因特定できるようにしたいので、Noneにしておく。
factori_table = [1] * (max_len + 1)
factori_inv_table = [1] * (max_len + 1)
for i in range(1, max_len + 1):
    factori_table[i] = factori_table[i-1] * (i) % mod

modinv_table[1] = 1
for i in range(2, max_len + 1):
    modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod
    factori_inv_table[i] = factori_inv_table[i-1] * modinv_table[i] % mod


def binomial_coefficients(n, k):
    '''
    n! / (k! * (n-k)! )
    0 <= k <= nを満たさないときは変な値を返してしまうので、先にNoneを返すことにする。
    場合によっては0のほうが適切かもしれない。
    '''
    if not 0 <= k <= n:
        return None
    return (factori_table[n] * factori_inv_table[k] * factori_inv_table[n-k]) % mod

# 重複要素を探索
appearance = [-1] * (n+1)
for idx, num in enumerate(nums):
    if appearance[num] == -1:
        appearance[num] = idx
    else:
        dup = [appearance[num], idx]
        break

j = n+1 - (dup[1] - dup[0] + 1)

for k in range(1, n+1+1):
    if k-1 > j:
        print((binomial_coefficients(n+1, k)))
    else:
        print(((binomial_coefficients(n+1, k) - binomial_coefficients(j, k-1)) % mod))


class COM:
    def __init__(self, n: int, mod: int):
        self.n = n
        self.mod = mod
        self.fact = [0] * (n + 1)
        self.factinv = [0] * (n + 1)
        self.inv = [0] * (n + 1)
        
        self.fact[0] = self.fact[1] = 1
        self.factinv[0] = self.factinv[1] = 1
        self.inv[1] = 1
        for i in range(2, n + 1):
            self.fact[i] = (self.fact[i - 1] * i) % mod
            self.inv[i] = (-self.inv[mod % i] * (mod // i)) % mod
            self.factinv[i] = (self.factinv[i - 1] * self.inv[i]) % mod
    
    def get_cmb(self, n: int, k: int):
        if (k < 0) or (n < k):
            return 0
        k = min(k, n - k)
        return self.fact[n] * self.factinv[k] % self.mod * self.factinv[n - k] % self.mod


def solve():
    n = int(input())
    a = list(map(int, input().split()))
    MOD = 10 ** 9 + 7
    
    pos = dict()
    l, r = -1, -1
    for i in range(n + 1):
        if a[i] in pos:
            l, r = pos[a[i]], i
            break
        pos[a[i]] = i
    
    com = COM(10 ** 5 + 1, MOD)
    print(n)
    for i in range(2, n + 1):
        ans = com.get_cmb(n + 1, i) - com.get_cmb(l + n - r, i - 1)
        print((ans % MOD))
    print((1))


def __starting_point():
    solve()

__starting_point()

mod = 1000000007
n= int(input())
a= list(map(int,input().split()))
check = [0]*(n+1)
g1=[1,1]
g2=[1,1]
inverse=[0,1]
for i in range(2,n+1+1):
    g1.append((g1[-1]*i)%mod)
    inverse.append((-inverse[mod%i]*(mod//i))%mod)
    g2.append((g2[-1]*inverse[-1])%mod)
def cmb2(n,r):
    mod = 1000000007
    if (r<0 or r>n ):return 0
    r = min(r, n-r)
    return g1[n]*g2[r]*g2[n-r]%mod
r=-1
jn=-1
for i in range(n+1):
    check[a[i]-1]+=1
    if check[a[i]-1]==2:
        jn,r=a[i],i
        break
l=a.index(jn)
s = min(l,n-r)
t = max(l,n-r)
print(n)
for p in range(2,n+1):
  w2=cmb2(n+1,p)
  y2=cmb2(s+t,p-1)
  print(((w2+mod)-y2) % mod)
print(1)

n = int(input())
a = [int(x) for x in input().split()]

mod = 10**9 + 7


class Comb(object):
    def __init__(self, N, mod=10**9 + 7):
        self.mod = mod
        self.fac, self.inv = [1] * (N + 1), [1] * (N + 1)
        for i in range(2, N + 1):
            self.fac[i] = self.fac[i - 1] * i % mod
            self.inv[i] = self.inv[i - 1] * pow(i, mod - 2, mod) % mod

    def calc(self, n, k):
        if n >= k:
            return self.fac[n] * self.inv[k] * self.inv[n - k]
        else:
            return 0


c = [0] * (n + 1)
indexes = [[] for _ in range(n+1)]
for i in range(n + 1):
    c[a[i]] += 1
    indexes[a[i]].append(i)
    if c[a[i]] == 2:
        indexes = indexes[a[i]]
        break

m = indexes[0] + (n - indexes[1])
comb = Comb(n + 1)
for k in range(1, n + 2):
    x = comb.calc(n + 1, k)
    y = comb.calc(m, k - 1)
    ans = (x - y) % mod
    print(ans)


from collections import Counter

N = int(input())
A = tuple(map(int, input().split()))
mod = 10 ** 9 + 7

U = N + 10
fact = [1] * (U + 1)
inv = [1] * (U + 1)

for i in range(1, U + 1):
    fact[i] = fact[i - 1] * i % mod

inv[U] = pow(fact[i], mod - 2, mod)
for i in range(U, 0, -1):
    inv[i - 1] = inv[i] * i % mod


def comb(N, r):
    if r < 0 or r > N:
        return 0
    res = fact[N] * inv[r] % mod
    res = res * inv[N - r] % mod
    return res


X = Counter(A).most_common()[0][0]
left = A.index(X)
right = A[::-1].index(X)
LR = left + right

for i in range(1, N + 2):
    ans = comb(N+1, i)-comb(LR, i-1)
    ans = (ans + mod) % mod
    print(ans)


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)

class Factorial:
    def __init__(self, n, mod=10**9+7):
        self.fac = [0] * (n+1)
        self.ifac = [0] * (n+1)
        self.fac[0] = 1
        self.ifac[0] = 1
        self.mod = mod
        modmod = self.mod - 2
        for i in range(n):
            self.fac[i+1] = self.fac[i] * (i+1) % self.mod
            self.ifac[i+1] = self.ifac[i] * pow(i+1, modmod, self.mod) % self.mod

    def comb(self, n, r):
        if n == 0 and r == 0:
            return 1
        if n < r or n < 0:
            return 0
        tmp =  self.ifac[n-r] * self.ifac[r] % self.mod
        return tmp * self.fac[n] % self.mod

    def perm(self, n, r):
        if n == 0 and r == 0:
            return 1
        if n < r or n < 0:
            return 0
        return (self.fac[n] * self.ifac[n-r]) % self.mod

n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7

d = {}
for i in range(0,n+1):
    if a[i] not in d:
        d[a[i]] = i
    else:
        l,r = d[a[i]], n-i
        break

fact = Factorial(n+1)

for i in range(1,n+2):
    ans = fact.comb(n+1,i)
    s = fact.comb(l+r,i-1)
    ans -= s
    while ans < 0:
        ans += mod
    print(ans)


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

class Factorial:
    def __init__(self, n, mod):
        self.f = [1]
        self.mod = mod
        for j in range(1, n + 1):
            self.f.append(self.f[-1] * j % mod)
        self.i = [pow(self.f[-1], mod - 2, mod)]
        for j in range(n, 0, -1):
            self.i.append(self.i[-1] * j % mod)
        self.i.reverse()
    def factorial(self, j):
        return self.f[j]
    def ifactorial(self, j):
        return self.i[j]
    def comb(self, n, k):
        return self.f[n] * self.i[n - k] % self.mod * self.i[k] % self.mod if n >= k else 0




N = int(input())
A = list(map(int, input().split()))

lst = [-1] * (N + 1)
for i in range(N + 1):
    a = A[i]
    if lst[a] == -1:
        lst[a] = i
    else:
        left = lst[a]
        right = i
        break
# print (left, right)
F = Factorial(N + 1, MOD).comb

for i in range(1, N + 2):
    if left + N - right >= i - 1:
        tmp = F(N + 1, i) - F(left + (N- right), i - 1)
    else:
        tmp = F(N + 1, i)
    print((tmp % MOD))






N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7

from collections import Counter
ctr = Counter(A)
d = ctr.most_common(1)[0][0]
x = A.index(d)
y = x+1 + A[x+1:].index(d)
f = x + N-y

MAXN = N+5
fac = [1,1] + [0]*MAXN
finv = [1,1] + [0]*MAXN
inv = [0,1] + [0]*MAXN
for i in range(2,MAXN+2):
    fac[i] = fac[i-1] * i % MOD
    inv[i] = -inv[MOD%i] * (MOD // i) % MOD
    finv[i] = finv[i-1] * inv[i] % MOD

def comb(n,r):
    if n < r: return 0
    if n < 0 or r < 0: return 0
    return fac[n] * (finv[r] * finv[n-r] % MOD) % MOD

ans = []
for i in range(1,N+2):
    ans.append((comb(N+1,i) - comb(f,i-1)) % MOD)
print(*ans, sep='\n')

mod = 10**9 + 7;

def inv(x):
  m = mod
  u = 1
  v = 0
  while m:
    t = x // m
    x -= t * m
    x, m = m, x
    u -= t * v
    u, v = v, u
  return u % mod

n = int(input())

fac = [1]
for i in range(1, n + 2):
  fac.append(fac[i - 1] * i % mod)

a = list(map(int, input().split()))
num = [0] * (n + 1)
for x in a:
  num[x] += 1

two = -1
for i, c in enumerate(num):
  if c == 2:
    two = i
    break

l = -1
r = -1;
for i in range(n + 1):
  if l == -1 and a[i] == two:
    l = i
  elif l != -1 and a[i] == two:
    r = n - i

for k in range(1, n + 2):
  if k - 1 <= l + r:
    print(((fac[n + 1] * inv(fac[k] * fac[n + 1 - k]) - fac[l + r] * inv(fac[k - 1] * fac[l + r - k + 1])) % mod))
  else:
    print((fac[n + 1] * inv(fac[k] * fac[n + 1 - k]) % mod))


#abc066d
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 com(n,k,m):
 return fact[n]*pow(fact[k],m-2,m)*pow(fact[n-k],m-2,m)%m

N=int(input())
A=list(map(int,input().split()))
c=[-1]*N
for i in range(N+1):
 if c[A[i]-1]!=-1:
  break
 c[A[i]-1]=i
j=c[A[i]-1]
i=N-i
for k in range(1,N+2):
 res=com(N+1,k,mod)
 if k-1<=i+j:
  res-=com(i+j,k-1,mod)
 print(res%mod)


n=int(input())
alist=list(map(int,input().split()))

MOD=10**9+7
inv_table = [0]+[1]
for i in range(2,n+2):
  inv_table.append(-(MOD//i)*inv_table[MOD%i]%MOD)

dic_a={}
same_pair=None
for i in range(n+1):
  if alist[i] in dic_a:
    same_pair=(dic_a[alist[i]],i)
    break
  else:
    dic_a[alist[i]]=i
pair_diff=n-(same_pair[1]-same_pair[0])
#print(same_pair,pair_diff)

comb1,comb2=1,1
for r in range(1,n+2):
  comb1*=(n-r+2)*inv_table[r]
  comb1%=MOD
  #print(comb1,comb2)
  print((comb1-comb2)%MOD)
  comb2*=(pair_diff-r+1)*inv_table[r]
  comb2%=MOD

n = int(input())
al = list(map(int, input().split()))

import collections
c = collections.Counter(al)
cc = c.most_common()[0][0]

da = ([i for i, x in enumerate(al) if x ==cc ][0])
db = ([i for i, x in enumerate(al) if x ==cc ][1])

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, n + 2):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

print(n)
for i in range(2,n+2):
    print((cmb(n-1,i,p)+ cmb(n-1,i-1,p)*2 -cmb(da+n-db,i-1,p) + cmb(n-1,i-2,p)) % p)

MOD = 10**9 + 7
MOD_t_MAX = 10**5+10

fac  = [None] * MOD_t_MAX
finv = [None] * MOD_t_MAX
inv  = [None] * MOD_t_MAX
def MOD_COM_init():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, MOD_t_MAX):
        fac[i] = fac[i - 1] * i % MOD
        inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD
def MOD_COM(n, k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD
def main():
    n = int(input())
    a = list(map(int, input().split()))
    p = [-1]*(n+1)
    l, r = -1, -1
    for i, v in enumerate(a):
        if p[v] == -1:
            p[v] = i
        else:
            l = p[v]
            r = i
            break
    MOD_COM_init()
    for i in range(1, n+2):
        if i == 1:
            print(n)
        else:
            tmp = MOD_COM(n+1, i)
            tmp -= MOD_COM(l+(n+1-r-1), i-1)
            while tmp < 0:
                tmp += MOD
            print(tmp)

def __starting_point():
    main()
__starting_point()

from collections import Counter
N = int(input())
A = list(map(int, input().split()))
mod = 10 ** 9 + 7

# とりあえず二項係数を答えにぶち込む
fact = [1]
for i in range(1, N + 2):
    fact.append(fact[-1] * i % mod)


ans = [0] * (N + 2)
fN = fact[N + 1]
for i in range(1, N + 2):
    div = fact[i] * fact[N - i + 1] % mod
    value = fN * pow(div, mod - 2, mod) % mod
    ans[i] = value

# 数列Aの中に2つあるやつx
# xの左側、右側にあるやつをカウントする
x = Counter(A).most_common()[0][0]
left = A.index(x)
right = N - A.index(x, left + 1)
M = left + right

for i in range(0, M + 1):
    num = fact[M]
    div = fact[i] * fact[M - i] % mod
    comb = num * pow(div, mod - 2, mod) % mod
    ans[i + 1] = (ans[i + 1] - comb + mod) % mod

print(*ans[1:], sep="\n")


L=10**5+3
MOD=10**9+7
fac=[1]*(L+1)
for i in range(1,L+1):
  fac[i]=fac[i-1]*i%MOD
inv_fac=[1]*(L+1)
inv_fac[L]=pow(fac[L],MOD-2,MOD)
for i in range(L-1,0,-1):
  inv_fac[i]=inv_fac[i+1]*(i+1)%MOD

def cmb(n,r):
  if n<0 or r<0 or r>n:
    return 0
  return fac[n]*inv_fac[r]%MOD*inv_fac[n-r]%MOD

N=int(input())
A=list(map(int,input().split()))

used=[0]*N
for i in range(N+1):
  a=A[i]
  if used[a-1]==0:
    used[a-1]=[1,i]
  else:
    x=a
    y=used[a-1][1]
    z=i
    break

print(N)
for i in range(2,N+2):
  ans=cmb(N+1,i)-cmb(N-z+y,i-1)
  print(ans%MOD)