#include <bits/stdc++.h>
using namespace std;
int main() {
  int mod = 1000000007;
  int n, m;
  cin >> n >> m;
  vector<int> oks(n + 1, true);
  for (auto i = 0; i < m; i++) {
    int a;
    cin >> a;
    oks[a] = false;
  }
  vector<long long int> dp(n + 1, 0);
  dp[0] = 1;
  for (auto now = 0; now < n; now++) {
    for (auto next = now + 1; next <= min(n, now + 2); next++) {
      if (oks[next]) {
        dp[next] += dp[now];
        dp[next] %= mod;
      }
    }
  }
  for (auto i = 0; i < n + 1; i++) {
    cout << dp[i] << endl;
  }
}
