#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
ll dp[100010];
int main() {
  int n, m;
  cin >> n >> m;
  map<int, int> a;
  for (int i = 0; i < (int)(m); i++) {
    int A;
    cin >> A;
    a[A]++;
  }
  for (int i = 0; i < (int)(n + 1); i++) {
    dp[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1)
      dp[i] = 0;
    else {
      if (i == 1)
        dp[i] = dp[i - 1] + 1;
      else if (i == 2)
        dp[i] = dp[i - 2] + 1 + dp[i - 1];
      else
        dp[i] = dp[i - 2] + dp[i - 1];
    }
    dp[i] %= MOD;
  }
  for (int i = 0; i < (int)(n); i++) {
    cout << dp[i] << endl;
  }
  cout << dp[n] << endl;
}
