#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
using vii = vector<vi>;
using Pll = pair<ll, ll>;
const int MOD = 1e9 + 7;
const int INF = 2e9;
template <class T>
void print(const T& t) {
  cout << t << endl;
}
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 gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int dp[100007];
int main() {
  ll n, m;
  cin >> n >> m;
  vi a(m);
  for (ll i = 0; i < (ll)(m); i++) {
    cin >> a[i];
  }
  dp[0] = 0;
  dp[1] = 1;
  dp[2] = 2;
  vector<bool> b(n + 1, true);
  for (ll i = 0; i < (ll)(m); i++) {
    b[a[i]] = false;
  }
  if (!b[1]) {
    dp[1] = 0;
    if (b[2]) {
      dp[2] = 1;
    }
  }
  if (!b[2]) {
    dp[2] = 0;
  }
  for (ll i = 3; i <= n; i++) {
    if (b[i]) {
      dp[i] = dp[i - 1] + dp[i - 2];
      dp[i] %= MOD;
    } else {
      dp[i] = 0;
    }
  }
  for (ll i = 0; i < (ll)(n + 1); i++) {
    print(dp[i]);
  }
}
