#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const ll mod = 1e+9+7;

int main(){
    int n,m;
    cin>>n>>m;
    vector<int> a(n+1,true);
    ll dp[100010];
    rep(i,m){
        int q;
        cin>>q;
        a[q]=false;
    }
    //////
    dp[0]=1;
    for(int i=0;i<n;++i){
        for(int j=i+1;j<=i+2;++j){
            if(a[j]==true){
                dp[j]+=dp[i];
                dp[j]%=mod;
            }
        }
        cout<<dp[n]<<endl;
    }