#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int my_abs_A(int num) {
  if (num > 0)
    return num;
  else
    return -num;
}
int my_abs_B(long long num, long long numb) {
  if (num - numb >= 0)
    return num - numb;
  else
    return -1 * (num - numb);
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
const long long INF = 1LL << 60;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> broken(M);
  vector<int> brokenstairs(100010);
  for (int i = 0; i < M; i++) {
    cin >> broken.at(i);
    brokenstairs.at(broken.at(i)) = 1;
  }
  vector<long long> dp(100010);
  dp.at(0) = 1;
  for (int i = 0; i < N; i++) {
    if (brokenstairs.at(i + 1) == 0) {
      dp.at(i + 1) = dp.at(i + 1) + dp.at(i) + 1;
      dp.at(i + 1) = dp.at(i + 1) % 1000000007;
    }
    if (brokenstairs.at(i + 2) == 0) {
      dp.at(i + 2) = dp.at(i + 2) + dp.at(i) + 1;
      dp.at(i + 2) = dp.at(i + 2) % 1000000007;
    }
  }
  for (int i = 0; i < 6; i++) {
    cout << dp.at(i) << endl;
  }
}
