#include <bits/stdc++.h>
int main(void) {
  int n, m, a, i;
  scanf("%d%d", &n, &m);
  int dp[n + 2], broken[n + 1];
  for (i = 0; i < n; i++) {
    broken[i] = 0;
    dp[i] = 0;
  }
  for (i = 0; i < m; i++) {
    scanf("%d", &a);
    broken[a] = 1;
  }
  dp[n] = 1;
  dp[n + 1] = 0;
  const long MOD = 1000000007;
  for (i = n - 1; i >= 0; i--) {
    if (broken[i]) continue;
    dp[i] = (dp[i + 1] + dp[i + 2]) % MOD;
  }
  for (i = 0; i < n + 2; i++) printf("%d ", dp[i]);
}
