#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll, ll>;
int main() {
  ll N, M;
  cin >> N >> M;
  vec A(M);
  for (ll(i) = (0), (i_len) = (M); (i) < (i_len); ++(i)) cin >> A[i];
  vec dp(N + 1, (1LL << 60));
  if (N == 1) {
    dp[1] = 1;
    for (ll(i) = (0), (i_len) = (M); (i) < (i_len); ++(i)) dp[A[i]] = 0;
  } else {
    dp[0] = 1;
    dp[1] = 1;
    dp[2] = 2;
    for (ll(i) = (0), (i_len) = (M); (i) < (i_len); ++(i)) dp[A[i]] = 0;
    for (ll(i) = (2), (i_len) = (N + 1); (i) < (i_len); ++(i)) {
      if (dp[i] != 0) dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
      cout << (dp[i]) << " ";
    }
  }
  cout << (dp[N]) << endl;
  return 0;
}
