#include #include using namespace std; struct E{ int to, rev; }; signed main(){ int N, M; cin>> N>> M; vector g[N]; for(int i=0; i> a>> b; g[a].push_back(E{b, g[b].size()}); g[b].push_back(E{a, g[a].size()-1}); } vector v; for(int n=N-1; n>=0; n--){ bool y=false; for(auto e: g[n]){ y|=(e.to>n); } v.push_back(y); if(y){ for(auto &e: g[n]){ if(e.to<0) continue; g[e.to][e.rev].to=-1; e.to=-1; } }else{ } } bool Lz=true; for(int d: v){ if(d==0){ if(Lz){ }else{ cout<< d; } }else{ if(Lz){ cout<< d; Lz=false; }else{ cout<< d; } } }cout<< endl; return 0; }