n,*a=list(map(int,open(0).read().split()));b={};M=10**9+7

for i,x in enumerate(a):b.setdefault(x,[]).append(i)

p=n+1;q=r=1;d=[abs(j[0]-j[1])for x,j in list(b.items())if len(j)>1][0]

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,*a=list(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, *a = list(map(int, open(0).read().split()))
b = {}
M = 10**9 + 7
for i, x in enumerate(a):
    b.setdefault(x, []).append(i)
p = n + 1
q = r = 1
d = [abs(j[0] - j[1]) for x, j in list(b.items()) if len(j) > 1][0]
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, *a = list(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

-for i, x in enumerate(a): -    b.setdefault(x, []).append(i) -d = [abs(j[0] - j[1]) for x, j in list(b.items()) if len(j) > 1][0] +for i, x in enumerate(a): +    if x in b: +        d = i - b[x] +        break +    b[x] = i