#include <bits/stdc++.h>
using namespace std;
int N, M;
int d = 1000000007;
int memo[100001];
int rec(int n) {
  if (n < 2)
    return 1;
  else if (memo[n] > -1)
    return memo[n];
  memo[n] = (rec(n - 1) + rec(n - 2)) % d;
  return memo[n];
}
int main() {
  int a;
  cin >> N >> M;
  memset(memo, -1, sizeof(memo));
  for (int i = 0; i < M; i++) {
    cin >> a;
    memo[a] = 0;
  }
  for (int i = 0; i < N; i++) {
    cout << memo[i] << " ";
  }
  cout << rec(N) << endl;
  return 0;
}
