import sys input = sys.stdin.readline n, m = map(int, input().split()) G = [[] for _ in range(n)] for _ in range(m): a, b = map(int, input().split()) G[a].append(b) G[b].append(a) s = set() ans = [] for v in range(n-1, -1, -1): for nv in G[v]: if nv>v and nv not in s: s.add(v) ans.append('1') break else: ans.append('0') print(int(''.join(ans)))