#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n, m;
  cin >> n >> m;
  vector<long long int> dp(n + 1, 0);
  vector<bool> a(n + 1, true);
  long long int mod = 1e9 + 7;
  int tmp;
  for (int i = 0; i < m; i++) {
    cin >> tmp;
    a.at(tmp) = false;
  }
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= min(n, i + 2); j++) {
      if (a.at(j) == true) {
        dp[j] += dp[i];
        dp[j] %= mod;
      }
    }
  }
  for (int i = 0; i <= n; i++) {
    cout << dp.at(i) << endl;
  }
  return 0;
}
