import java.io.PrintWriter; import java.util.*; import java.util.concurrent.SynchronousQueue; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); ArrayList[] g = new ArrayList[n]; for (int i = 0; i < n; ++i) g[i] = new ArrayList<>(); int[] a = new int[m]; int[] b = new int[m]; boolean[] used = new boolean[n]; for (int i = 0; i < m; ++i) { a[i] = sc.nextInt(); b[i] = sc.nextInt(); g[a[i]].add(b[i]); g[b[i]].add(a[i]); } for (int i = n - 1; i >= 0; --i) { boolean f = true; for (int dst : g[i]) { if (dst > i && !used[dst]) { f = false; break; } } if (!f) { used[i] = true; } } boolean f = false; PrintWriter pw=new PrintWriter(System.out); for (int i = n - 1; i >= 0; --i) { if (!f && !used[i]) continue; else f = true; pw.print(used[i] ? 1 : 0); } pw.println(); pw.close(); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }