#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cout << fixed << setprecision(9);
  int n, m;
  cin >> n >> m;
  map<int, bool> a;
  for (long long i = (long long)(0); i < (long long)(m); ++i) {
    int b;
    cin >> b;
    a[b] = true;
  }
  vector<int> dp(n + 1);
  dp[0] = 1;
  dp[1] = a[1] ? 0 : 1;
  for (long long i = (long long)(2); i < (long long)(n + 1); ++i) {
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
    if (a[i]) dp[i] = 0;
  }
  for (long long i = (long long)(0); i < (long long)(n + 1); ++i)
    cout << dp[i] << "\n";
  ;
  cout << dp[n] << "\n";
  ;
}
