#include <bits/stdc++.h>
using namespace std;
int main() {
  int N = 0, M = 0, q = 0;
  int a[10000] = {0};
  long long int dp[10000] = {0};
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (a[j] - 1 == i) {
        q += 1;
      }
    }
    if (q != 0) {
      dp[i] = 0;
    } else if (i > 1) {
      dp[i] = dp[i - 1] + dp[i - 2];
      dp[i] %= 1000000007;
    } else {
      dp[0] = 1;
      dp[1] = 2;
    }
    q = 0;
  }
  for (int i = 0; i < N; i++) {
    cout << dp[i] % 1000000007 << endl;
  }
}
