//Typical Stairs

#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=x;i<y;i++)
using ll = long long;
#define range(a) (a).begin(),(a).end()

int main (){
    ll N,M,a=0,b=1,c=-1;cin >> N >> M;
    bool ANA[N]={false},dame=false;

    int C[M];C[0]=-1;
    rep(i,0,M){
        cin >> C[i];
        ANA[C[i]]=true;
        if(C[i]-c==1)dame=true;
        c=C[i];
    }

    vector<int> Ans(N,0);
    Ans[0]=1;if(!ANA)Ans[1]=1;
    rep(j,2,N+1){
        Ans[j]=0;
        if(!ANA[j-2])Ans[j] += Ans[j-2];
        if(!ANA[j-1])Ans[j] += Ans[j-1];
        Ans[j]%=1000000007;
        cout << Ans[j] << endl;
    }
    if(dame==true)cout << "0" << endl;
    else cout << Ans[N] << endl;
    return 0;
}