#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } int main() { int n; int m; while (~scanf("%d%d", &n, &m)) { vector > g(n); for (int i = 0; i < m; ++ i) { int u, v; scanf("%d%d", &u, &v); g[u].push_back(v); g[v].push_back(u); } vector vis(n); string ans; for (int i = n - 1; i >= 0; -- i) { bool a = false; for (int j : g[i]) a |= i <= j && !vis[j]; vis[i] = a; ans += char('0' + a); } ans = ans.substr(ans.find('1')); puts(ans.c_str()); } return 0; }