import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

enum M = 1_000_000_007;

struct Number {

    long x;

    this(long x) {
        if (x < 0) x = x % M + M;
        this.x = x % M;
    }

    Number opBinary(string op)(Number n) {
        return Number(mixin("x"~op~"n.x"));
    }

    string toString() {
        return x.to!string;
    }
}

Number[Tuple!(long, long)] memo;

Number combi(long n, long r) {
    if (n < r) return Number(0);
    if (r == 0) return Number(1);
    if (n == 0) return Number(0);
    if (r * 2 > n) return combi(n, n-r);
    if (auto p = tuple(n, r) in memo) return *p;
    return memo[tuple(n, r)] = combi(n-1, r-1) + combi(n-1, r);
}
void main() {

    auto n = readln.chomp.to!long;

    auto a = readln.split.to!(long[]);

    auto dupl = sort(a).group.find!(a => a[1] == 2).front[0];

    auto left = a.enumerate.find!(a => a.value == dupl).front.index;

    auto right = a.enumerate.retro.find!(a => a.value == dupl).front.index;

    foreach (k; 1..n+2) {
        writeln(combi(n+1, k) - combi(left, k-1) - combi(n-right-1, k-1));
    }
}

