#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l = 1000000000 + 7;
  int n, m;
  cin >> n >> m;
  vector<bool> data(n, false);
  long long dp[n + 1];
  for (int i = 0; i <= n; i++) dp[i] = l;
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    data[a] = true;
  }
  if (data[0]) dp[0] = 0;
  if (data[1]) dp[1] = 0;
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= l;
    if (data[i]) dp[i] = 0;
    cout << dp[i] << endl;
  }
  cout << dp[n] << endl;
}
