#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ int n,m; cin>>n>>m; vector<vector<int> > G(n); for(int i=0;i<m;i++){ int a,b; cin>>a>>b; G[a].emplace_back(b); G[b].emplace_back(a); } vector<int> used(n); for(int i=n-1;i>=0;i--){ if(used[i]) continue; for(int v:G[i]) used[v]=1; } while(used.size()>1u&&used.back()==0) used.pop_back(); reverse(used.begin(),used.end()); for(int x:used) cout<<x; cout<<endl; return 0; }