#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, x;
  cin >> n >> m;
  long long int a[n + 1];
  for (int i = 0; i < n; i++) a[i] = 0;
  for (int i = 0; i < m; i++) {
    cin >> x;
    a[x] = -1;
  }
  if (a[n] != -1) {
    a[n] = 1;
    if (n > 1 && a[n - 1] != -1) {
      a[n - 1] = 1;
    }
  }
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] != -1) {
      if (a[i + 1] != -1) {
        a[i] += a[i + 1];
      }
      if (a[i + 2] != -1) {
        a[i] += a[i + 2];
      }
      a[i] %= 1000000007;
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << a[0] % 1000000007 << '\n';
}
