#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  cin >> N >> M;
  vector<long long> a(M), s(N + 1);
  for (int i = 0; i < M; i++) {
    cin >> a[i];
    s[a[i]] = -1;
  }
  int ii = 0;
  for (int i = 0; i < M - 1; i++) {
    if (a[i + 1] - a[i] == 1) {
      cout << 0 << endl;
      exit(0);
    }
  }
  s[0] = 1;
  if (s[1] != -1) {
    s[1] = 1;
  }
  for (int i = 2; i <= N; i++) {
    if (s[i] != -1) {
      if (s[i - 2] == -1) {
        s[i] = s[i - 1];
      } else if (s[i - 1] == -1) {
        s[i] = s[i - 2];
      } else {
        s[i] = s[i - 1] + s[i - 2];
      }
    }
  }
  for (int i = 1; i <= N; i++) {
    cout << s[i] << " ";
  }
}
