#include <bits/stdc++.h>
using namespace std;
int stairchecker(int x);
int main(void) {
  int N, M, res = 1;
  cin >> N >> M;
  int a[M];
  int k = 0;
  int answer[M + 1];
  for (int i = 0; i < M; i++) {
    cin >> a[i];
  }
  answer[0] = stairchecker(N - a[M - 1] - 1);
  for (int i = M - 2; i >= 0; i--) {
    if ((a[i + 1] - a[i] - 1) == 0) {
      answer[k] = 0;
      continue;
    }
    answer[k] = stairchecker((a[i + 1] - a[i] - 1));
    k++;
  }
  answer[M] = stairchecker(a[0] - 1);
  for (int i = 0; i < M + 1; i++) {
    cout << answer[i] << endl;
    res = answer[i] * res;
  }
  cout << res;
}
int stairchecker(int x) {
  if (x == 0) {
    return 1;
  }
  if (x < 0) {
    return 0;
  } else {
    return stairchecker(x - 1) + stairchecker(x - 2);
  }
}
