#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b;
a++;
bool e[a];
for(int j=0;j<a;j++){
e[j]=0;
}
for(int i=0;i<b;i++){
cin>>c;
e[c]=!e[c];
c++;
e[c]=!e[c];
c--;
c--;
e[c]=!e[c];
}
e[a]=e[0];
for(int j=1;j<a;j++){
cout<<e[j]<<" ";
}
return 0;
}
50分都不到