CodeEff/ECCO huggingface dataset:
# Original solution
from collections import Counter
n,*a = list(map(int,open(0).read().split()))
dbl = Counter(a).most_common()[0][0]
l,r = [i for i,j in enumerate(a) if j==dbl]
const = n+l-r
m = n + 1
mod = 10**9+7
fac = [1]*(m+1)
inv = [1]*(m+1)
for i in range(1,m+1):
	fac[i] = fac[i-1] * i % mod
inv[-1] = pow(fac[-1], mod - 2, mod)
for i in range(m-1, -1, -1):
	inv[i] = inv[i+1] * (i+1) % mod
def cmb(n,r):
	if n<r:return 0
	return fac[n] * inv[n-r] * inv[r] % mod
for k in range(1,n+2):
	print(((cmb(n+1,k)-cmb(const,k-1)) % mod))

# Optimized solution
def main():
	n,*a = list(map(int,open(0).read().split()))
	dbl = sum(a)-n*(n+1)//2
	l,r = [i for i,j in enumerate(a) if j==dbl]
	const = n+l-r
	m = n + 1
	mod = 10**9+7
	fac = [1]*(m+1)
	inv = [1]*(m+1)
	for i in range(1,m+1):
		fac[i] = fac[i-1] * i % mod
	inv[-1] = pow(fac[-1], mod - 2, mod)
	for i in range(m-1, -1, -1):
		inv[i] = inv[i+1] * (i+1) % mod
	def cmb(n,r):
		if n<r:return 0
		return fac[n] * inv[n-r] * inv[r] % mod
	for k in range(1,n+2):
		print(((cmb(n+1,k)-cmb(const,k-1)) % mod))
if __name__=="__main__":main()
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
mod=pow(10,9)+7
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 )
# 二つあるやつはどの場所にあるか検索
f=[-1]*(n+1)
l,r=0,0
for i in range(n):
  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)
  for i in range(k+1):
    a-=cmb(l,i,mod)*cmb(r,k-i-1,mod)
  print(a)


# Optimized solution
n=int(eval(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))
# Original solution
n = int(eval(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 = 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 - 1
        break

for i in range(1, n+2):
    ans = 0
    # Xを選ばない
    ans += cmb(n-1, i) # 0
    # Xを2回選ぶ
    ans += cmb(n-1, i-2) # 2
    # Xを1回選ぶ
    ans += cmb(n-1-n2, i-1) # 
    for j in range(1, n2+1):
        ans += 2 * cmb(n2, j) * cmb(n-n2-1, i-j-1) % mod
        ans %= mod
    print((ans % mod))


# Optimized solution
n = int(eval(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))
# Original solution
def comb(n,k,p):
	from math import factorial
	if n<0 or k<0 or n<k: return 0
	if n==0 or k==0: return 1
	a,b,c = factorial(n)%p,factorial(k)%p,factorial(n-k)%p
	return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
	if b==0: return 1
	elif b%2==0:
		d = power_func(a,b//2,p)
		return d**2 %p
	elif b%2==1: return (a*power_func(a,b-1,p))%p
from collections import Counter
n = int(eval(input()))
a = [int(i) for i in input().split()]
twice = Counter(a).most_common(1)[0][0]
x,y = (i for i,j in enumerate(a) if j == twice)
num,y = 1,n-y
for i in range(1,x+y+2):
	ans = comb(n+1,i,10**9+7)
	for j in range(max(0,i-y-1),min(i,x+1)):
		ans -= comb(x,j,10**9+7)*comb(y,i-j-1,10**9+7)
	print(ans)
for i in range(x+y+2,n+2): print((comb(n+1,i,10**9+7)))

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

# Optimized solution
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(eval(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)
# Original solution
from collections import Counter

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

ctr = Counter(src)
most = ctr.most_common(1)[0][0]
i1 = src.index(most)
i2 = src[i1+1:].index(most) + i1+1
d = i2 - i1

MOD = 10**9+7

def mul(a,b):
    return (a*b) % MOD

def pow(a,n): # a^n
    ret = 1
    mag = a
    while n > 0:
        if n & 1:
            ret = mul(ret, mag)
        mag = mul(mag, mag)
        n >>= 1
    return ret

def inv(a):
    return pow(a, MOD-2)

fac = [1]
fac_inv = [1]
for n in range (1,N+3):
    f = mul(fac[n-1], n)
    fac.append(f)
    fac_inv.append(inv(f))

def ncr(n,r):
    return mul(mul(fac[n], fac_inv[n-r]), fac_inv[r])

anss = []
for r in range(1,N+2):
    anss.append(ncr(N+1,r))
n = N-d
for r in range(n+1):
    anss[r] -= ncr(n,r)
    anss[r] %= MOD

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


# Optimized solution
from collections import Counter
N = int(input())
src = list(map(int,input().split()))
ctr = Counter(src)
doub = ctr.most_common()[0][0]
i1 = src.index(doub)
i2 = src[::-1].index(doub)
doub_len = (i1+i2+1)

MOD = 10**9+7

fac = [1,1] + [0]*N
finv = [1,1] + [0]*N
inv = [0,1] + [0]*N
for i in range(2,N+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 ncr(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(ncr(N+1,i))
for i in range(doub_len):
    ans[i] -= ncr(doub_len-1, i)
    ans[i] %= MOD
print(*ans,sep='\n')
# Original solution
from collections import Counter
N = int(input())
src = list(map(int,input().split()))
ctr = Counter(src)
doub = ctr.most_common()[0][0]
i1 = src.index(doub)
i2 = src[::-1].index(doub)
doub_len = (i1+i2+1)

MOD = 10**9+7

fac = [1,1] + [0]*N
finv = [1,1] + [0]*N
inv = [0,1] + [0]*N
for i in range(2,N+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 ncr(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(ncr(N+1,i))
for i in range(doub_len):
    ans[i] -= ncr(doub_len-1, i)
    ans[i] %= MOD
print(*ans,sep='\n')


# Optimized solution
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')
# Original solution
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


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)


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

appeared = set()
dup_right = 0
dup = 0
for i, x in enumerate(a):
    if x in appeared:
        dup_right = n - i
        dup = x
        break
    appeared.add(x)
dup_left = 0
for i, x in enumerate(a):
    if x == dup:
        dup_left = i
        break

for k in range(1, n + 2):
    print(((comb(n + 1, k, MOD) - comb(dup_right + dup_left, k - 1, MOD) + MOD) % MOD))


# Optimized solution
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


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)


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

appeared = set()
dup_right = 0
dup = 0
for i, x in enumerate(a):
    if x in appeared:
        dup_right = n - i
        dup = x
        break
    appeared.add(x)
dup_left = 0
for i, x in enumerate(a):
    if x == dup:
        dup_left = i
        break

for k in range(1, n + 2):
    print(((comb(n + 1, k, MOD) - comb(dup_right + dup_left, k - 1, MOD)) % MOD))
# Original solution
n = int(eval(input()))
a = list(input().split())

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

MOD = 10 ** 9 + 7

b = sorted(a)

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

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

w = n + first - second

c = [0 for _ in range(n + 2)]
d = [0 for _ in range(n + 2)]

L = 1
H = 1
for i in range(1, n + 2):
    L *= i
    H *= n + 2 - i
    c[i] = L
    d[i] = H

e = [0 for _ in range(w + 1)]
temp = 1
for i in range(1, w + 1):
    temp *= w + 1 - i
    e[i] = temp


def ncmb(k):
    return d[k] // c[k]

def wcmb(k):
    if k > w or k <= 0:
        return 0
    elif k == w:
        return 1
    else:
        return e[k] // c[k]

print(n)
for k in range(2, n + 2):
    ans = ncmb(k) - wcmb(k-1)
    print((ans % MOD))



# Optimized solution
n = int(eval(input()))
a = list(input().split())

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

MOD = 10 ** 9 + 7

b = sorted(a)

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

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

w = n + first - second

print(n)
x = n + 1
y = 1
z = 1
for _ in range(n):
    x *= n + 1 - z
    x //= z + 1
    if z <= w:
        y *= w + 1 - z
        y //= z
    else:
        y = 0
    print(((x - y) % MOD))
    z += 1
# Original solution
n = int(eval(input()))
a = list(input().split())

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

MOD = 10 ** 9 + 7

b = sorted(a)

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

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

w = n + first - second

print(n)
x = n + 1
y = 1
z = 1
for _ in range(n):
    x *= n + 1 - z
    x //= z + 1
    if z <= w:
        y *= w + 1 - z
        y //= z
    else:
        y = 0
    print(((x - y) % MOD))
    z += 1


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

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

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

MOD = 10 ** 9 + 7

b = sorted(a)

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

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

w = n + first - second

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

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

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

from collections import defaultdict
n = int(eval(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))


# Optimized solution
n = int(eval(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))
# Original solution
N = int(eval(input()))
A = [int(_) for _ in input().split()]
mod = 10**9+7

memo=[0]*(N+2)
def comb(x, y):
    if x == N-1 and memo[y] > 0:
        return memo[y]
    elif y > x:
        return 0
    elif y * 2 > x:
        y = x - y
    result = 1
    for j in range(1, y + 1):
        result *= (x + j - y) * pow(j, mod - 2, mod)
        result %= mod
    if x == N-1:
        memo[y] = result
    return result


dupl = sum(A)-N*(N+1)//2
ds = []
for _ in range(N+1):
    if A[_] == dupl:
        ds += [_]
i, j = ds

print(N)
for k in range(2, N+2):
    print(((comb(N-1, k)+comb(N-1, k-2)+2*comb(N-1, k-1)-comb(N-j+i, k-1)) % mod))


# Optimized solution
N = int(eval(input()))
A = [int(_) for _ in input().split()]
mod = 10**9 + 7

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


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


b = set()
for a in A:
    if a in b:
        break
    b.add(a)
c = []
for i in range(N + 1):
    if A[i] == a:
        c += [i]
i, j = c
for x in range(1, N + 2):
    print(((comb(N + 1, x) - (comb(N - j + i, x - 1))) % mod))
# Original solution
#11
n = int(eval(input()))
a = list(map(int, input().split()))

flag = [a.count(a[i])-1 for i in range(n+1) ]
p = flag.index(1) + list(reversed(flag)).index(1)

g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
mod = 10**9 + 7
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 )

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


for i in range(n+1):
    if ( p>=i ):
        c = combination(n+1, i+1) - combination(p, i)
    else:
        c = combination(n+1, i+1)
    print(( int(c) ))

# Optimized solution

MOD = 10**9+7
n = int(eval(input()))
la = list(map(int,input().split()))
L = [-1]*(n+1)
l = 0
for i in range(n+1):
  a = la[i]
  if L[a] == -1:
    L[a] = i
  else:
    l = i - L[a] - 1
    break
 
MAX = n
factorial = [1, 1]
inverse = [0, 1]
inverse_factorial = [1, 1]
for i in range(2,MAX+1):
  factorial.append( (factorial[-1]*i)%MOD )
  inverse.append( (-inverse[MOD%i]*(MOD//i))%MOD )
  inverse_factorial.append( (inverse_factorial[-1]*inverse[-1])%MOD )
 
def C_MOD(n, k):
  if k < 0 or k > n:
    return 0
  k = min(k,n-k)
  return factorial[n] * inverse_factorial[k] * inverse_factorial[n-k] % MOD
 
print(n)
#print((2*C_MOD(n-1,1)-C_MOD(n-1-l,1)+C_MOD(n-1,2)+1)%MOD)
for i in range(2,n+1):
  if n > l+1:
    print(((2*C_MOD(n-1,i-1)-C_MOD(n-1-l,i-1)+C_MOD(n-1,i)+C_MOD(n-1,i-2))%MOD))
  else:
    print(((2*C_MOD(n-1,i-1)+C_MOD(n-1,i)+C_MOD(n-1,i-2))%MOD))
print((1))
# Original solution
n=int(eval(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))

# Optimized solution
n=int(eval(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))
# Original solution
def combination_modp(n, r, p): # nCr modpを求める
    r = min(n-r, r)
    result = 1
    for i in range(n, n-r, -1):
        result *= i
        result %=p
    for i in range(1, r+1):
        result *= pow(i,p-2,p)
        result %= p
    return result

n = int(eval(input()))
a = list(map(int,input().split()))
search = [-1 for i in range(n)]
l,r = -1,-1
for i,x in enumerate(a):
    if search[x-1] == -1:
        search[x-1] = i
    else:
        l = search[x-1]
        r = i
#print(l,r)
p = 10**9 + 7
for i in range(1,n+2):
    if l+n-r+1 >= i:
        ans = combination_modp(n+1,i,p)-combination_modp(l+n-r,i-1,p)
    else:
        ans = combination_modp(n+1,i,p)
    print((ans%p))

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
search = [-1 for i in range(n)]
l,r = -1,-1
for i,x in enumerate(a):
    if search[x-1] == -1:
        search[x-1] = i
    else:
        l = search[x-1]
        r = i
#print(l,r)
p = 10**9 + 7

#前計算
comb1 = [0 for _ in range(n+1)]
comb1[0] = n+1
x = n+1
for i in range(1,n+1):
    x = (x*(n-i+1))%p
    x = (x*pow(i+1,p-2,p))%p
    comb1[i] = x

comb2 = [0 for _ in range(n+1)]
comb2[0] = 1
x = 1
for i in range(1,l+n-r+1):
    x = (x*(n+l-r-i+1))%p
    x = (x*pow(i,p-2,p))%p
    comb2[i] = x

for i in range(n+1):
    ans = comb1[i]-comb2[i]

    print((ans%p))
# Original solution
from collections import Counter

n, *a = list(map(int, open(0).read().split()))
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


mod = 10 ** 9 + 7
N = n
# 元テーブル
g1 = [0] * (N + 1)
g1[0] = 1
g1[1] = 1

# 逆元テーブル
g2 = [0] * (N + 1)
g2[0] = 1
g2[1] = 1

# 逆元テーブル計算用テーブル
inverse = [0] * (N + 1)
inverse[0] = 0
inverse[1] = 1

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

d = Counter(a).most_common(1)[0][0]
lr = [i for i, e in enumerate(a) if e == d]
l = lr[1] - lr[0] + 1

answer = [(cmb(n, i, mod) - cmb(n - l, i - 1, mod)) % mod for i in range(1, n + 1)]
print(('\n'.join(map(str, answer))))

# Optimized solution
from collections import Counter

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


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


def make_table(n, mod=10 ** 9 + 7):
    mod = mod
    N = n
    # 元テーブル
    g1 = [0] * (N + 1)
    g1[0] = 1
    g1[1] = 1

    # 逆元テーブル
    g2 = [0] * (N + 1)
    g2[0] = 1
    g2[1] = 1

    # 逆元テーブル計算用テーブル
    inverse = [0] * (N + 1)
    inverse[0] = 0
    inverse[1] = 1

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

    return g1, g2, inverse


d = Counter(a).most_common(1)[0][0]
lr = [i for i, e in enumerate(a) if e == d]
l = lr[1] - lr[0] + 1
g1, g2, inverse = make_table(n)
MOD = 10 ** 9 + 7

answer = [(cmb(n, i) - cmb(n - l, i - 1)) % MOD for i in range(1, n + 1)]
print(('\n'.join(map(str, answer))))