#include <bits/stdc++.h>

using namespace std;

const int mod = 1e9 + 7;
inline int read(){int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;}


const int max0 = 1 << 18;

struct comp
{
	double x, y;

	comp() : x(0), y(0) {}
	comp(const double &_x, const double &_y) : x(_x), y(_y) {}
};

inline comp operator+(const comp &a, const comp &b)
{
	return comp(a.x + b.x, a.y + b.y);
}

inline comp operator-(const comp &a, const comp &b)
{
	return comp(a.x - b.x, a.y - b.y);
}

inline comp operator*(const comp &a, const comp &b)
{
	return comp(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}

inline comp conj(const comp &a) { return comp(a.x, -a.y); }

const double PI = acos(-1);

int N, L;

comp w[max0 + 5];
int bitrev[max0 + 5];

void fft(comp *a, const int &n)
{
	for (int i = 0; i < n; ++i)
		if (i < bitrev[i])
			swap(a[i], a[bitrev[i]]);
	for (int i = 2, lyc = n >> 1; i <= n; i <<= 1, lyc >>= 1)
		for (int j = 0; j < n; j += i)
		{
			comp *l = a + j, *r = a + j + (i >> 1), *p = w;
			for (int k = 0; k<i>> 1; ++k)
			{
				comp tmp = *r * *p;
				*r = *l - tmp, *l = *l + tmp;
				++l, ++r, p += lyc;
			}
		}
}

inline void fft_prepare()
{
	for (int i = 0; i < N; ++i)
		bitrev[i] = bitrev[i >> 1] >> 1 | ((i & 1) << (L - 1));
	for (int i = 0; i < N; ++i)
		w[i] = comp(cos(2 * PI * i / N), sin(2 * PI * i / N));
}

inline vector<int> conv(const vector<int> &x, const vector<int> &y)
{
	static comp a[max0 + 5], b[max0 + 5];
	static comp dfta[max0 + 5], dftb[max0 + 5], dftc[max0 + 5], dftd[max0 + 5];
	L = 0;
	while ((1 << L) < x.size() + y.size() - 1)
		++L;
	N = 1 << L;
	fft_prepare();
	for (int i = 0; i < N; ++i)
		a[i] = b[i] = comp(0, 0);
	for (int i = 0; i < x.size(); ++i)
		a[i] = comp(x[i] & 32767, x[i] >> 15);
	for (int i = 0; i < y.size(); ++i)
		b[i] = comp(y[i] & 32767, y[i] >> 15);
	fft(a, N), fft(b, N);
	for (int i = 0; i < N; ++i)
	{
		int j = (N - i) & (N - 1);
		static comp da, db, dc, dd;
		da = (a[i] + conj(a[j])) * comp(0.5, 0);
		db = (a[i] - conj(a[j])) * comp(0, -0.5);
		dc = (b[i] + conj(b[j])) * comp(0.5, 0);
		dd = (b[i] - conj(b[j])) * comp(0, -0.5);
		dfta[j] = da * dc;
		dftb[j] = da * dd;
		dftc[j] = db * dc;
		dftd[j] = db * dd;
	}
	for (int i = 0; i < N; ++i)
		a[i] = dfta[i] + dftb[i] * comp(0, 1);
	for (int i = 0; i < N; ++i)
		b[i] = dftc[i] + dftd[i] * comp(0, 1);
	fft(a, N), fft(b, N);
	vector<int> z(x.size() + y.size() - 1);
	for (int i = 0; i < x.size() + y.size() - 1; ++i)
	{
		int da = (long long)(a[i].x / N + 0.5) % mod;
		int db = (long long)(a[i].y / N + 0.5) % mod;
		int dc = (long long)(b[i].x / N + 0.5) % mod;
		int dd = (long long)(b[i].y / N + 0.5) % mod;
		z[i] =
			(da + ((long long)(db + dc) << 15) + ((long long)dd << 30)) % mod;
	}
	return z;
}

const int maxn = 1e5 + 50;

inline int mul( int x , int y ){
	return 1LL * x * y % mod;
}

inline void upd( int & x , int y ){
	x += y;
	if( x >= mod )
		x -= mod;
}

int power_mod( int x , int y ){
	int ret = 1;
	while( y ){
		if( y & 1 )
			ret = mul( ret , x );
		y >>= 1;
		x = mul( x , x );
	}
	return ret;
}

int fac[maxn] , f[maxn] , n , inv[maxn] , b[maxn] , base;
vector < int > pos[maxn] , sa , sb , sc;

int C( int n , int m ){
	if( n < m )
		return 0;
	if( n == 0 && m == 0 )
		return 1;
	return mul( fac[n] , power_mod( mul( fac[m] , fac[n - m] ) , mod - 2 ) );
}

int main( int argc , char * argv[] ){
	n = read();
	fac[0] = inv[0] = 1;
	for(int i = 1 ; i <= n + 1 ; ++ i){
		fac[i] = mul( fac[i - 1] , i );
		inv[i] = power_mod( fac[i] , mod - 2 );
		int x = read();
		pos[x].emplace_back( i );
	}
	fft_prepare();
	for(int i = 1 ; i <= n ; ++ i)
		if( pos[i].size() == 2 ){
			int x = pos[i][0] - 1;
			int y = n + 1 - pos[i][1];
			for(int j = 0 ; j <= x ; ++ j)
				sa.emplace_back( power_mod( mul( fac[j] , fac[x - j] ) , mod - 2 ) );
			for(int j = 0 ; j <= y ; ++ j)
				sb.emplace_back( power_mod( mul( fac[j] , fac[y - j] ) , mod - 2 ) );
			base = mul( fac[x] , fac[y] );
			break;
		}
	sc = conv( sa , sb );
	for(int i = 0 ; i < sc.size() ; ++ i)
		b[i] = mul( sc[i] , base );
	printf( "%d\n" , n );
	n ++ ;
	for(int i = 2 ; i <= n ; ++ i){
		int ans = C( n - 2 , i );
		upd( ans , C( n - 2 , i - 2 ) );
		upd( ans , mul( 2 , C( n - 2 , i - 1 ) ) );
		upd( ans , mod - b[i - 1] );
		printf( "%d\n" , ans );
	}
	return 0;
}

Measured memory_bytes: 39160