#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int n, k;
int A[5036], S[5036];
int tr[5036][5036];
int iv[5036];
int Pow(int x, int a) {
  int ret = 1;
  while (a) {
    if (a & 1) ret = ret * 1ll * x % P;
    x = x * 1ll * x % P, a >>= 1;
  }
  return ret;
}
void solve() {
  cin >> n;
  for (int i = (1), iend = (n - 1); i <= iend; ++i) scanf("%d", A + i);
  S[1] = iv[1] = 1;
  for (int i = (2), iend = (n); i <= iend; ++i)
    S[i] = (S[i - 1] * 1ll * A[i - 1] % P), iv[i] = Pow(S[i], P - 2);
  for (int i = (1), iend = (n + 1); i <= iend; ++i)
    tr[i][i] = S[i] * 1ll * S[i] % P * (P + 1 >> 1) % P;
  for (int len = (2), lenend = (n); len <= lenend; ++len) {
    for (int i = (1), iend = (n - len + 1); i <= iend; ++i) {
      int j = i + len - 1;
      tr[i][j] = (S[i] * 1ll * S[j] % P + tr[i + 1][j - 1]) % P;
    }
  }
  for (int a = (1), aend = (2 * n - 2); a <= aend; ++a) {
    int pr = 0;
    for (int l = (1), lend = (n); l <= lend; ++l) {
      int L = l, R = l + a;
      if (R <= n) pr = (pr + iv[l + 1] * 1ll * S[R] % P * S[l]) % P;
      if (R >= n) L += R - n, R = n;
      if (L > R) continue;
      pr = (pr + (tr[L][R] * 1ll * (iv[l] + P - iv[l + 1]) % P)) % P;
    }
    printf("%d ", pr);
  }
}
signed main() { solve(); }
