#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  int dp[n + 1];
  memset(dp, -1, sizeof(dp));
  dp[0] = dp[1] = 1;
  for (int i = 0; i < m; i++) {
    int temp;
    cin >> temp;
    dp[temp] = 0;
  }
  for (int i = 2; i <= n; i++) {
    if (dp[i] != 0) {
      dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
    }
  }
  for (int64_t i = 0; i < n + 1; i++) cout << dp[i] << " ";
  ;
}
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
