#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  int N, M, a;
  cin >> N >> M;
  vector<bool> check(N + 1, true);
  for (int i = 0; i < M; i++) {
    cin >> a;
    check[a] = false;
  }
  vector<long long int> dp(N + 1);
  dp[0] = 1;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j <= min(i + 2, N); j++) {
      if (check[j]) {
        dp[j] += dp[i];
        dp[j] %= mod;
      }
    }
    cout << dp[i] << endl;
  }
  cout << dp[N] << endl;
}
