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