import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); ArrayList> graph = new ArrayList<>(); for (int i = 0; i < n; i++) { graph.add(new TreeSet<>()); } for (int i = 0; i < m; i++) { int a = sc.nextInt(); int b = sc.nextInt(); graph.get(a).add(b); graph.get(b).add(a); } StringBuilder sb = new StringBuilder(); for (int i = n - 1; i >= 0; i--) { if (graph.get(i).last() > i) { sb.append("1"); for (int x : graph.get(i)) { graph.get(x).remove(i); } } else { if (sb.length() > 0) { sb.append("0"); } } } System.out.println(sb); } }