CodeEff/ECCO huggingface dataset:
# Original solution
mod = 1000000007
n= int(eval(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)
    x=p-t-1
    y=s
    yobun=0
    for k in range(max(p-t-1,0),s+1):
      if p-t-1<=k<=s:
        yobun+=cmb2(s,k)*cmb2(t,p-k-1)
    print((((w2+mod)-yobun) % mod))

print((1))


# Optimized solution
mod = 1000000007
n= int(eval(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))
# Original solution
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

mod = 10**9+7

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


factorial = [1]

for i in range(1,n+2):
    tmp = factorial[-1]*i
    factorial.append(tmp)

def combinations_count(n,r):
    if n-r < 0:
        return 0
    return factorial[n]//(factorial[n-r]*factorial[r])

A = copy.deepcopy(a)
A.sort()
for i in range(n+1):
    if A[i] == A[i+1]:
        double = A[i]
        break

cnt = 0
for i in range(n+1):
    if a[i] == double:
        if cnt == 0:
            l = i+1
            cnt += 1
        else:
            r = i+1
# print(l,r)
for k in range(1,n+2):
    # print(n+1,k,l+n-r,k-1)
    ans = (combinations_count(n+1,k)-combinations_count((l+n-r),(k-1)))%mod
    print(ans)


# Optimized solution
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

mod = 10**9+7



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


# 階乗 & 逆元計算
factorial = [1]
inverse = [1]
for i in range(1, n+2):
    factorial.append(factorial[-1] * i % mod)
    inverse.append(pow(factorial[-1], mod-2, mod))

def combinations_count(n,r):
    if n-r < 0:
        return 0
    return factorial[n]*inverse[r]*inverse[n-r]%mod

A = copy.deepcopy(a)
A.sort()
for i in range(n+1):
    if A[i] == A[i+1]:
        double = A[i]
        break

cnt = 0
for i in range(n+1):
    if a[i] == double:
        if cnt == 0:
            l = i+1
            cnt += 1
        else:
            r = i+1
# print(l,r)
for k in range(1,n+2):
    # print(n+1,k,l+n-r,k-1)
    ans = (combinations_count(n+1,k)-combinations_count((l+n-r),(k-1)))%mod
    print(ans)
# Original solution
from statistics import mode

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

# 2回表れている値とそのインデックスを取得
C = mode(A)
C_indexes = [i for i, x in enumerate(A) if x == C]

# 二つのCの外側にそれぞれ何個ずつあるか
outside = C_indexes[0] + len(A) - C_indexes[1] - 1

# 階乗・逆元の値を保存
factorial = [1]
inverse = [1]
for i in range(1, N+2):
    factorial.append(factorial[-1]*i % MOD)
    inverse.append((pow(factorial[i], MOD-2, MOD)))

# combination計算
def nCr(n, r):
    if n<r or n==0 or r==0:
        return 0
    return factorial[n] * inverse[r] * inverse[n-r] % MOD


print(N)
for i in range(2, N+2):
    print((int(nCr(N+1, i) - nCr(outside, i-1)) % MOD))

# Optimized solution
"""
実験のためにkobaya0514様のコードをいじくらせていただいております
"""

N = int(eval(input()))
A = [int(x) for x in input().split()]
# 重複始点終点調査
se = []
c = sum(A) - N * (N + 1) / 2
for i in range(len(A)):
    if A[i] == c:
        se.append(i)
l = se[0]
r = se[1]

mod = 10 ** 9 + 7

# 階乗計算
factorial = [1]
inverse = [1]
for i in range(1, N + 2):
    factorial.append(factorial[-1] * i % mod)
    inverse.append((pow(factorial[-1], mod - 2, mod)))


# combination計算
def nCr(n, r):
    if n < r or n == 0 or r == 0:
        return 0
    return factorial[n] * inverse[r] * inverse[n - r] % mod


print(N)
for i in range(2, N + 2):
    print((int(nCr(N + 1, i) - nCr(l + N - r, i - 1)) % mod))
# Original solution
from collections import Counter
N = int(eval(input()))
A = list(map(int, input().split()))
mod = 10 **9 + 7


# 階乗 & 逆元計算
factorial = [1]
inverse = [1]
for i in range(1, N+2):
    factorial.append(factorial[-1] * i % mod)
    inverse.append(pow(factorial[-1], mod-2, mod))


# 組み合わせ計算
def nCr(n, r):
    if n < r or r < 0:
        return 0
    elif r == 0:
        return 1
    return factorial[n] * inverse[r] * inverse[n - r] % mod


X = Counter(A).most_common(1)[0][0]
X_index = []
for i, a in enumerate(A, start=1):
    if a == X:
        X_index.append(i)
L, R = X_index[0], X_index[1]

for k in range(1, N + 2):
    if k == 1:
        print(N)
    else:
        print(((nCr(N + 1, k) - nCr(N - R + L, k - 1)) % mod))


# Optimized solution
N = int(eval(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))
# Original solution
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 = list(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)
for i in range(1,n+2):
    ans = comb(n+1,i,m)
    for j in range(max(0,i-right-1),min(left,i-1)+1):
        ans = (ans-comb(left,j,m)*comb(right,i-j-1,m)) % m
    print(ans)

# Optimized solution
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 = list(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)
# Original solution
def main():
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    div = pow(10, 9) + 7

    # print(A)
    d = dict()
    for i in range(N+1):
        if A[i] not in d: d[A[i]] = [i]
        else: d[A[i]].append(i)

    i1, i2 = 0, 0
    for a in d:
        if len(d[a]) == 2:
            i1, i2 = d[a]
            break
    M = i1 + N-i2
    # print(N, i1, i2)

    # N+1_C_l
    pow1 = [1, 1]
    for i in range(2, N+2):
        pow1.append(pow1[-1]*i % div)
    pow2 = [1, 1]
    for i in range(2, N+2):
        j = powquick(i, div-2, div)
        # print((i * j) % div)
        pow2.append(pow2[-1]*j % div)

    # print(pow1)
    # print(pow2)
    for l in range(1, N+2):
        v = (pow1[N+1]*pow2[l]*pow2[N+1-l]) % div
        # print(v)
        if l <= M+1:
            v -= (pow1[M]*pow2[l-1]*pow2[M-l+1]) % div
        print((v % div))

def powquick(x, y, div):
        if y == 0: return 1
        if y == 1: return x % div
        if y % 2 == 0: return pow(powquick(x, y // 2, div), 2) % div
        if y % 2 == 1: return pow(powquick(x, y// 2, div), 2) * x % div


if __name__ == '__main__':
    main()

# Optimized solution
def main():
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    div = pow(10, 9) + 7

    # print(A)
    d = dict()
    for i in range(N+1):
        if A[i] not in d: d[A[i]] = [i]
        else: d[A[i]].append(i)

    i1, i2 = 0, 0
    for a in d:
        if len(d[a]) == 2:
            i1, i2 = d[a]
            break
    M = i1 + N-i2
    # print(N, i1, i2)

    # N+1_C_l
    pow1 = [1, 1]
    for i in range(2, N+2):
        pow1.append(pow1[-1]*i % div)

    # pow2 = [1, 1]
    # for i in range(2, N+2):
    #     j = powquick(i, div-2, div)
    #     pow2.append(pow2[-1]*j % div)

    pow2 = [1, 1]
    inv = [0, 1]
    for i in range(2, N+2):
        inv.append((-inv[div % i]) *(div // i) % div)
        pow2.append(pow2[-1] * inv[-1] % div)

    for l in range(1, N+2):
        v = (pow1[N+1]*pow2[l]*pow2[N+1-l]) % div
        # print(v)
        if l <= M+1:
            v -= (pow1[M]*pow2[l-1]*pow2[M-l+1]) % div
        print((v % div))

def powquick(x, y, div):
        if y == 0: return 1
        if y == 1: return x % div
        if y % 2 == 0: return pow(powquick(x, y // 2, div), 2) % div
        if y % 2 == 1: return pow(powquick(x, y// 2, div), 2) * x % div


if __name__ == '__main__':
    main()
# Original solution
def main():
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    div = pow(10, 9) + 7

    # print(A)
    d = dict()
    for i in range(N+1):
        if A[i] not in d: d[A[i]] = [i]
        else: d[A[i]].append(i)

    i1, i2 = 0, 0
    for a in d:
        if len(d[a]) == 2:
            i1, i2 = d[a]
            break
    M = i1 + N-i2
    # print(N, i1, i2)

    # N+1_C_l
    pow1 = [1, 1]
    for i in range(2, N+2):
        pow1.append(pow1[-1]*i % div)

    pow2 = [1, 1]
    for i in range(2, N+2):
        j = powquick(i, div-2, div)
        pow2.append(pow2[-1]*j % div)

    # pow2 = [1, 1]
    # inv = [0, 1]
    # for i in range(2, N+2):
    #     inv.append((-inv[div % i]) *(div // i) % div)
    #     pow2.append(pow2[-1] * inv[-1] % div)

    for l in range(1, N+2):
        v = (pow1[N+1]*pow2[l]*pow2[N+1-l]) % div
        # print(v)
        if l <= M+1:
            v -= (pow1[M]*pow2[l-1]*pow2[M-l+1]) % div
        print((v % div))

def powquick(x, y, div):
        if y == 0: return 1
        if y == 1: return x % div
        if y % 2 == 0: return pow(powquick(x, y // 2, div), 2) % div
        if y % 2 == 1: return pow(powquick(x, y// 2, div), 2) * x % div


if __name__ == '__main__':
    main()

# Optimized solution

def main():
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    div = pow(10, 9) + 7

    # print(A)
    d = dict()
    for i in range(N+1):
        if A[i] not in d: d[A[i]] = [i]
        else: d[A[i]].append(i)

    i1, i2 = 0, 0
    for a in d:
        if len(d[a]) == 2:
            i1, i2 = d[a]
            break
    M = i1 + N-i2
    # print(N, i1, i2)

    # N+1_C_l
    pow1 = [1, 1]
    for i in range(2, N+2):
        pow1.append(pow1[-1]*i % div)

    # pow2 = [1, 1]
    # for i in range(2, N+2):
    #     j = powquick(i, div-2, div)
    #     pow2.append(pow2[-1]*j % div)

    pow2 = [1, 1]
    inv = [0, 1]
    for i in range(2, N+2):
        inv.append((-inv[div % i]) *(div // i) % div)
        pow2.append(pow2[-1] * inv[-1] % div)

    for l in range(1, N+2):
        v = (pow1[N+1]*pow2[l]*pow2[N+1-l]) % div
        # print(v)
        if l <= M+1:
            v -= (pow1[M]*pow2[l-1]*pow2[M-l+1]) % div
        print((v % div))

# def powquick(x, y, div):
#         if y == 0: return 1
#         if y == 1: return x % div
#         if y % 2 == 0: return pow(powquick(x, y // 2, div), 2) % div
#         if y % 2 == 1: return pow(powquick(x, y// 2, div), 2) * x % div


if __name__ == '__main__':
    main()
# Original solution
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


N = I()
A = [0] + LI()
mod = 10**9+7

count = [0]*(N+1)
for i in range(1,N+2):
    if count[A[i]] != 0:
        a = count[A[i]]
        b = i
    else:
        count[A[i]] = i


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


def nCr(n,r):
    if n < r:
        return 0
    return (kaijou[n]*pow(kaijou[r],mod-2,mod)*pow(kaijou[n-r],mod-2,mod)) % mod


for k in range(1,N+2):
    print(((nCr(N+1,k)-nCr(N+a-b,k-1)) % mod))



# Optimized solution
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり


N = I()
A = [0] + LI()
mod = 10**9+7

count = [0]*(N+1)
for i in range(1,N+2):
    if count[A[i]] != 0:
        a,b = count[A[i]],i  # 重複する文字のあるindex
    else:
        count[A[i]] = i


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


def nCr(n,r):
    if n < r:
        return 0
    return (kaijou[n]*pow(kaijou[r],mod-2,mod)*pow(kaijou[n-r],mod-2,mod)) % mod


for k in range(1,N+2):
    print(((nCr(N+1,k)-nCr(N+a-b,k-1)) % mod))
# Original solution
import sys
input = sys.stdin.readline
########   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

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(eval(input()))
A=list(map(int,input().split()))
v=[-1]*n
for i,a in enumerate(A):
    #print(i,a)
    if v[a-1]!=-1:
        s=v[a-1]
        f=i
    if v[a-1]==-1:
        v[a-1]=i

#print(s,f)
mod=10**9+7
for i in range(1,n+1):
    """sousuu=cmb(n+1,i,mod)
    tyouhuku=cmb(s+n-f,i-1,mod)"""
    if i==1:
        sousuu=n+1
        tyouhuku=1
    else:
        sousuu*=(n+2-i)
        sousuu//=i
        tyouhuku*=(s+n-f+1-i+1)
        tyouhuku//=(i-1)
    #print(sousuu,tyouhuku)
    print(((sousuu-tyouhuku)%mod))
print((1))


# Optimized solution
import sys
input = sys.stdin.readline
########   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

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(eval(input()))
A=list(map(int,input().split()))
v=[-1]*n
for i,a in enumerate(A):
    #print(i,a)
    if v[a-1]!=-1:
        s=v[a-1]
        f=i
    if v[a-1]==-1:
        v[a-1]=i

#print(s,f)
mod=10**9+7
for i in range(1,n+1):
    sousuu=cmb(n+1,i,mod)
    tyouhuku=cmb(s+n-f,i-1,mod)
    """if i==1:
        sousuu=n+1
        tyouhuku=1
    else:
        sousuu*=(n+2-i)
        sousuu//=i
        tyouhuku*=(s+n-f+1-i+1)
        tyouhuku//=(i-1)"""
    #print(sousuu,tyouhuku)
    print(((sousuu-tyouhuku)%mod))
print((1))
# Original solution
mod = int(1e9) + 7


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


fact = [1] * int(1e5+1)
for i in range(1, int(1e5+1)):
    fact[i] = (i * fact[i-1]) % mod
inv = [1] * int(1e5+1)
for i in range(0, int(1e5+1)):
    inv[i] = power(fact[i], mod-2) % mod


def combination(n, r):
    return fact[n] * inv[r] * inv[n-r] % mod


def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    idx = [-1] * (N+1)
    x = 0
    for i in range(N+1):
        if idx[A[i]] == -1:
            idx[A[i]] = i
        else:
            x = i - idx[A[i]]
    for i in range(1, N+2):
        ans = combination(N+1, i)
        if i <= (N+1-x):
            ans = (ans - combination(N+1-(x+1), i-1)) % mod
        print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
mod = int(1e9) + 7


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


fact = [1] * int(1e5+2)
for i in range(1, int(1e5+2)):
    fact[i] = (i * fact[i-1]) % mod
inv = [1] * int(1e5+2)
inv[int(1e5+1)] = power(fact[int(1e5+1)], mod-2) % mod
for i in range(int(1e5), 0, -1):
    inv[i] = (inv[i+1] * (i+1)) % mod


def combination(n, r):
    return fact[n] * inv[r] * inv[n-r] % mod


def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    idx = [-1] * (N+1)
    x = 0
    for i in range(N+1):
        if idx[A[i]] == -1:
            idx[A[i]] = i
        else:
            x = i - idx[A[i]]
    for i in range(1, N+2):
        ans = combination(N+1, i)
        if i <= (N+1-x):
            ans = (ans - combination(N+1-(x+1), i-1)) % mod
        print(ans)


if __name__ == "__main__":
    main()
# Original solution
from math import factorial
from collections import Counter
mod = 10**9 + 7

n = int(eval(input()))
length = n+1
li = list(map(int,input().split()))

counter = Counter(li)
dup = counter.most_common()[0][0]
be, af = [i for i, x in enumerate(li) if x==dup]
soto = be + length - af - 1

for k in range(1, n+2):
    if k == 1:
        print(n)
    elif k == n+1:
        print((1))
    else:
        zyouhukuari = factorial(length) // (factorial(k)*factorial(length-k))
        if soto-k+1 >= 0:
            zyouhuku = factorial(soto) // (factorial(k-1)*factorial(soto-k+1))
        else:
            zyouhuku = 0
        val = zyouhukuari - zyouhuku
        print((val%mod))

# Optimized solution
import collections

N = int(eval(input()))
a = list(map(int, input().split()))

c = collections.Counter(a)
dup = c.most_common()[0][0]

id = [i for i, x in enumerate(a) if x == dup]
L = id[0]
R = id[1]

MOD = 10**9 +7
factorial = [1]
inverse = [1]

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

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

print(N)
for i in range(2, N+2):
    ans = (C(N+1, i) - C(L+(N-R), i-1)) % MOD
    print(ans)
# Original solution
n = int(eval(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))


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

from collections import Counter
C = Counter(A)
for k, v in list(C.items()):
    if v == 2:
        t = k

flag = False
for i in range(n+1):
    if not flag:
        if A[i] == t:
            l = i
            flag = True
    else:
        if A[i] == t:
            r = i

r = n-r

#print(l, r)

N = 10**5+50
fac = [1]*(N+1)
finv = [1]*(N+1)
for i in range(N):
    fac[i+1] = fac[i] * (i+1) % mod
finv[-1] = pow(fac[-1], mod-2, mod)
for i in reversed(list(range(N))):
    finv[i] = finv[i+1] * (i+1) % mod

def cmb1(n, r, mod):
    if r <0 or r > n:
        return 0
    r = min(r, n-r)
    return fac[n] * finv[r] * finv[n-r] % mod

for k in range(1, n+2):
    ans = cmb1(n+1, k, mod)-cmb1(l+r, k-1, mod)
    print((ans%mod))
# Original solution
#!/usr/bin/env python3
#ABC66 D

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def f(a, b):
    if b == 0: 
        return 1
    if b % 2 == 0:
        d = f(a, b // 2)
        return d * d % mod
    if b % 2 == 1:
        return (a * f(a, b - 1)) % mod


def comb(n,r):
    if n - r < 0:
        return 0
    return fact[n] * invfact[r] * invfact[n-r] % mod

n = I()
a = LI()
cnt = [0]*(n+1)
for i in range(n+1):
    if cnt[a[i]]:
        a = cnt[a[i]]
        b = i+1
        break
    else:
        cnt[a[i]] = i+1

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

for i in range(n+1):
    res = 0
    res = (res + comb(n+1,i+1)) % mod
    res = (res - comb((a-1)+(n+1-b),i)) % mod
    print(res)
    

# Optimized solution
#!/usr/bin/env python3
#ABC66 D

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))


def comb(n,r):
    if n - r < 0:
        return 0
    return fact[n] * invfact[r] * invfact[n-r] % mod

n = I()
a = LI()
cnt = [0]*(n+1)
for i in range(n+1):
    if cnt[a[i]]:
        a = cnt[a[i]]
        b = i+1
        break
    else:
        cnt[a[i]] = i+1

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

for i in range(n+1):
    res = 0
    res = (res + comb(n+1,i+1)) % mod
    res = (res - comb((a-1)+(n+1-b),i)) % mod
    print(res)
# Original solution
mod=10**9+7
n=int(eval(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))

# Optimized solution
mod=10**9+7
n=int(eval(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))