#include <bits/stdc++.h>
using namespace std;
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    long long temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long modInverse(long long A, long long M) {
  extendedEuclid(A, M);
  return (x % M + M) % M;
}
int main() {
  long long n, m, i, j, k, l, w, s, u, v, count0 = 0;
  long long mod = 1e9 + 7;
  cin >> n >> m;
  vector<long long> V(m);
  for (int i = 0; i < m; i++) {
    cin >> V[i];
  };
  if (n / 2 < m && m != 0) {
    cout << 0;
    return 0;
  }
  sort(V.begin(), V.end());
  for (i = 0; i < m - 1; i++) {
    if ((V[i + 1] - V[i]) == 1) {
      cout << 0;
      return 0;
    }
  }
  vector<long long> fac(10006), ifac(100006);
  fac[0] = 1;
  fac[1] = 1;
  for (i = 2; i < 10006; i++) {
    fac[i] = i * fac[i - 1] % mod;
  }
  ifac[0] = 1;
  ifac[1] = 1;
  for (i = 2; i < 10006; i++) {
    ifac[i] = (ifac[i - 1] * modInverse(i, mod)) % mod;
  }
  long long temp = -1, t_sum = 0, dif;
  for (i = 0; i < m; i++) {
    dif = V[i] - temp - 2;
    for (j = 0; (dif - 2 * j) >= 0; j++) {
      t_sum += ((fac[dif - j] % mod) *
                (((ifac[j] % mod) * (ifac[dif - 2 * j]) % mod)) % mod) %
               mod;
      cout << t_sum << " ";
    }
    t_sum++;
    temp = V[i];
  }
  dif = n - V[m - 1] - 1;
  if (V[m - 1] != n - 1) {
    for (j = 0; (dif - 2 * j) >= 0; j++) {
      t_sum += ((fac[dif - j] % mod) *
                (((ifac[j] % mod) * (ifac[dif - 2 * j]) % mod)) % mod) %
               mod;
      cout << t_sum << " ";
    }
    t_sum++;
  }
  cout << t_sum % mod;
  return 0;
}
