#include<iostream>
#include<iomanip>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<functional>
#include<map>
#include<cstdlib>
#include<complex>
#include<numeric>
#include<set>
#include<deque>
#include<queue>

using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000000 + 7;

template <class T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
	for (const auto& e : vec) os << e << (&e == &vec.back() ? "\n" : " ");
	return os;
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& st) {
	for (const auto& e : st) os << e << " ";
	return os;
}
template <class T1, class T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
	os << "(" << p.first << "," << p.second << ")";
	return os;
}
template <class T1, class T2>
ostream& operator<<(ostream& os, const map<T1, T2>& mp) {
	for (const auto& e : mp) os << e << " ";
	return os;
}

#ifdef _DEBUG
template <class T>
void dump(const char* str, T&& h) { cerr << str << " = " << h << "\n"; };
template <class Head, class... Tail>
void dump(const char* str, Head&& h, Tail&&... t) {
	while (*str != ',') cerr << *str++; cerr << " = " << h << "\n";
	dump(str + (*(str + 1) == ' ' ? 2 : 1), t...);
}
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else 
#define DMP(...) ((void)0)
#endif

/*使い方
Factorial a;//Factorialクラスのaを作成　

（※デフォルトで110000が入っているが、もっと大きいnで計算したい場合
Factorial a(1000000);
などと置く必要がある）

Int b = a.Pmod(5, 2);//nPkを計算 → 20を出力
Int c = a.Cmod(5, 2);//nCkを計算 → 10を出力
Int d = a.Pmod(5, 5);//n!を計算 → 120を出力

*/
class Factorial {
private:
	vector<Int> fac, inv, finv;

	void build(Int N) {
		fac[0] = fac[1] = 1; inv[1] = 1; finv[0] = finv[1] = 1;

		for (Int i = 2; i < N; i++) {
			fac[i] = fac[i - 1] * i % MOD;
			inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
			finv[i] = finv[i - 1] * inv[i] % MOD;
		}
	}

public:
	Factorial(Int N = 110000) : fac(N + 1), inv(N + 1), finv(N + 1) { build(N + 1); }

	//nCkの計算
	Int Cmod(Int n, Int k) {
		if (n < k || k < 0) return 0LL;
		return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}

	//nPkの計算
	Int Pmod(Int n, Int k) {
		if (n < k || k < 0) return 0LL;
		return fac[n] * finv[n - k] % MOD;
	}
};

template<int Modulo = MOD> struct Mint {
	Int val;
	constexpr Mint(Int v = 0) noexcept : val(v% Modulo) {
		if (val < 0) v += Modulo;
	}
	constexpr int getmod() { return Modulo; }
	constexpr Mint operator - () const noexcept { return val ? Modulo - val : 0; }
	constexpr Mint operator + (const Mint& r) const noexcept { return Mint(*this) += r; }
	constexpr Mint operator - (const Mint& r) const noexcept { return Mint(*this) -= r; }
	constexpr Mint operator * (const Mint& r) const noexcept { return Mint(*this) *= r; }
	constexpr Mint operator / (const Mint& r) const noexcept { return Mint(*this) /= r; }
	constexpr Mint& operator += (const Mint& r) noexcept {
		val += r.val;
		if (val >= Modulo) val -= Modulo;
		return *this;
	}
	constexpr Mint& operator -= (const Mint& r) noexcept {
		val -= r.val;
		if (val < 0) val += Modulo;
		return *this;
	}
	constexpr Mint& operator *= (const Mint& r) noexcept {
		val = val * r.val % Modulo;
		return *this;
	}
	constexpr Mint& operator /= (const Mint& r) noexcept {
		Int a = r.val, b = Modulo, u = 1, v = 0;
		while (b) {
			Int t = a / b;
			a -= t * b; swap(a, b);
			u -= t * v; swap(u, v);
		}
		val = val * u % Modulo;
		if (val < 0) val += Modulo;
		return *this;
	}
	constexpr bool operator == (const Mint& r) const noexcept {
		return this->val == r.val;
	}
	constexpr bool operator != (const Mint& r) const noexcept {
		return this->val != r.val;
	}
	friend ostream& operator << (ostream& os, const Mint<Modulo>& x) noexcept {
		return os << x.val;
	}
	friend istream& operator >> (istream& is, Mint<Modulo>& x) noexcept {
		Int tmp; is >> tmp;
		x = Mint<Modulo>(tmp);
		return is;
	}
	friend constexpr Mint<Modulo> modpow(const Mint<Modulo>& a, Int n) noexcept {
		Mint res(1), tmp = a;
		while (n > 0) {
			if (n & 1) res *= tmp;
			tmp *= tmp;
			n >>= 1;
		}
		return res;
	}
};

using mint = Mint<>;

int main() {

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	Int n;
	cin >> n;

	vector<Int> a(n + 1);
	vector<Int> cnt(n + 1);//どの数が2回出てくるか調査
	for (Int i = 0; i < n+1; i++) {
		cin >> a[i];
		cnt[a[i]]++;
	}

	Int res;//2回出てくる数字
	for (Int i = 1; i <= n; i++) {
		if (cnt[i]==2) {
			res = i;
			break;
		}
	}

	Int flag = 0;//走査、resが出てきているか
	Int cnt0, cnt1, cnt2;
	Int temp = 0;
	for (Int i = 0; i < n+1; i++) {
		if (a[i]==res) {
			if (flag==0) {
				cnt0 = temp;
				temp = 0;
				flag = 1;
			}
			else if (flag==1) {
				cnt1 = temp;
				temp = 0;
				flag = 2;
			}
		}
		else {
			temp++;
		}
	}
	cnt2 = temp;

	DMP(cnt0, cnt1, cnt2);

	Factorial b;//nCk計算用
	mint ans, temp1, temp2, temp3, temp4, temp5, temp6,temp7;
	for (Int k = 1; k < n+2; k++) {//長さkの部分列
		ans = 0;
		temp1 = 0;
		temp2 = 0;
		temp3 = 0;
		temp4 = 0;
		temp5 = 0;
		temp6 = 0;
		temp7 = 0;

		if (k==1) {
			cout << n << "\n";
		}

		else {
			//resの数字を一つも使わない場合
			if ((n + 1) - 2 >= 0 && (n + 1) - 2 >= k) {
				ans += b.Cmod((n + 1) - 2, k);
			}

			//resの数字を二つとも使う場合
			if ((n + 1) - 2 >= 0 && k - 2 >= 0 && (n + 1) - 2 >= k - 2) {
				ans += b.Cmod((n + 1) - 2, k - 2);
			}

			//resの数字を1つのみ使う場合
			if (cnt0 >= 0 && cnt0 >= k - 1) {
				temp1 = b.Cmod(cnt0, k - 1);
			}
			if (cnt1 >= 0 && cnt1 >= k - 1) {
				temp2 = b.Cmod(cnt1, k - 1);
			}
			if (cnt2 >= 0 && cnt2 >= k - 1) {
				temp3 = b.Cmod(cnt2, k - 1);
			}

			if (cnt0 + cnt1 >= 0 && cnt0 + cnt1 >= k - 1) {
				temp4 = b.Cmod(cnt0 + cnt1, k - 1);
				temp4 -= temp1 + temp2;
			}
			if (cnt0 + cnt2 >= 0 && cnt0 + cnt2 >= k - 1) {
				temp5 = b.Cmod(cnt0 + cnt2, k - 1);
				temp5 -= temp1 + temp3;
			}
			if (cnt1 + cnt2 >= 0 && cnt1 + cnt2 >= k - 1) {
				temp6 = b.Cmod(cnt1 + cnt2, k - 1);
				temp6 -= temp2 + temp3;
			}

			if (cnt0 + cnt1 + cnt2 >= 0 && cnt0 + cnt1 + cnt2 >= k - 1) {
				temp7 = b.Cmod(cnt0 + cnt1 + cnt2, k - 1);
				temp7 -= temp1 + temp2 + temp3 + temp4 + temp5 + temp6;
			}
			ans += temp1 + temp3 + temp5;
			temp2 *= 2;
			temp4 *= 2;
			temp6 *= 2;
			temp7 *= 2;
			ans += temp2+temp4+temp6+temp7;
			cout << ans << "\n";
		}
	}

}


Measured memory_bytes: 5376