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

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

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

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

-most = ctr.most_common(1)[0][0] -i1 = src.index(most) -i2 = src[i1 + 1 :].index(most) + i1 + 1 -d = i2 - i1 +doub = ctr.most_common()[0][0] +i1 = src.index(doub) +i2 = src[::-1].index(doub) +doub_len = i1 + i2 + 1 - - -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)) +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 -    return mul(mul(fac[n], fac_inv[n - r]), fac_inv[r]) +    if n < r: +        return 0 +    if n < 0 or r < 0: +        return 0 +    return fac[n] * (finv[r] * finv[n - r] % MOD) % MOD -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") +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")