#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  int a[100010] = {};
  for (int i = 0; i < M; i++) cin >> a[i];
  long long dp[100100] = {};
  dp[0] = 0;
  dp[1] = 1;
  dp[2] = 2;
  for (int i = 0; i < M; i++) {
    if (a[i] == 1) {
      dp[1] = 0;
      dp[2] = 1;
    }
    if (a[i] == 2) {
      dp[2] = 0;
    }
  }
  for (int i = 3; i < N + 1; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    for (int j = 0; j < M; j++) {
      if (i == a[j]) {
        dp[i] = 0;
      }
    }
    dp[i] %= 1000000007;
  }
  for (int i = 0; i < N + 1; i++) {
    cout << dp[i] << endl;
  }
  cout << dp[N] << endl;
}
