#include using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; const double eps=1e-9; template ostream &operator<<(ostream &os, const vector &vec){ os << "["; for (const auto &v : vec) { os << v << ","; } os << "]"; return os; } void solve(){ int n,m; cin >> n >> m; vector> graph(n); rep(i,0,m){ int a,b; cin >> a >> b; graph[a].push_back(b); graph[b].push_back(a); } vector used(n); priority_queue> que; int count=0; rep(i,0,n) que.push(i); while(count vs; for(auto v:graph[u]){ if(used[v]) continue; vs.push_back(v); } for(int v:vs){ used[v]=true; for(auto w:graph[v]){ if(used[w]) continue; ++count; } } } vector ans(n); rep(i,0,n){ if(used[i]) ans[i]=1; else ans[i]=0; } for(int i=n-1; i>=0; --i){ if(ans[i]){ for(int j=i; j>=0; --j) cout << ans[j]; cout << endl; return; } } cout << 0 << endl; } int main(){ std::cin.tie(0); std::ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(10); solve(); return 0; }