#include <bits/stdc++.h>
#include <cmath>

#include <assert.h>    // LON
#include <math.h>    // sqrt()


using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
//#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) ll(x.size())
typedef long long ll;
//typedef pair<int, int> P;
typedef pair<ll, ll> P;
//const double INF = 1e10;
const ll INF = LONG_LONG_MAX;
const ll MINF = -10e10;
//const int INF = INT_MAX;
#define cmin(x, y) x = min(x, y)
#define cmax(x, y) x = max(x, y)


//ifstream myfile("C:\\Users\\riku\\Downloads\\0_00.txt");
//ofstream outfile("log.txt");
//outfile << setw(6) << setfill('0') << prefecture << setw(6) << setfill('0') << rank << endl;
// std::cout << std::bitset<8>(9);

//typedef priority_queue<P, vector<P>, greater<P>> PQ_ASK;
const int mod = 1000000007;

struct mint {
    ll x; // typedef long long ll;
    mint(ll x = 0) : x((x % mod + mod) % mod) {}

    mint &operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }

    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }

    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }

    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }

    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const {
        return pow(mod - 2);
    }

    mint &operator/=(const mint a) {
        return (*this) *= a.inv();
    }

    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};

struct combination {
    vector<mint> fact, ifact;

    combination(int n) : fact(n + 1), ifact(n + 1) {
        assert(n < mod);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
    }

    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n - k];
    }
} combination(10000000);

int findDuplicateNumber(vector<int> &numbers) {
    set<int> cache;
    for (int n : numbers) {
        if (cache.find(n) == cache.end()) {
            cache.insert(n);
        } else {
            return n;
        }
    }
    __throw_runtime_error("nai");
}

struct IndexPair {
    int left, right;
};

IndexPair findIndexPair(int dn, vector<int> &numbers) {
    auto it1 = find(numbers.begin(), numbers.end(), dn);
    int left = distance(numbers.begin(), it1);
    auto it2 = find(it1 + 1, numbers.end(), dn);
    int right = distance(numbers.begin(), it2);
    return IndexPair{left, right};
}

int calcLeftPadding(int left) {
    return left;
}

int calcRightPadding(int right, int n) {
    return n - right - 1;
}

int main() {
    int n;
    cin >> n;

    vector<int> numbers(n + 1);

    rep(i, n + 1) cin >> numbers[i];

    int dn = findDuplicateNumber(numbers);

    IndexPair dnIndex = findIndexPair(dn, numbers);

    for (int k = 1; k <= n + 1; k++) {

        int leftPadding = calcLeftPadding(dnIndex.left);
        int rightPadding = calcRightPadding(dnIndex.right, n + 1);

        int padding = leftPadding + rightPadding;


        mint all = combination(n + 1, k);
        mint diff = combination(padding, k - 1);

        cout << (all - diff).x << endl;

    }


}

Measured memory_bytes: 162560