import sys input = sys.stdin.readline N, M = map(int, input().split()) G = [[] for i in range(N)] for i in range(M): A, B = map(int, input().split()) G[A].append((B, i)) G[B].append((A, i)) seenV, seenE = [0] * N, [0] * M ans = [0] * N for i in range(N - 1, -1, -1): if seenV[i]: continue seenV[i] = 1 temp = [] for u, ind in G[i]: if seenE[ind]: continue temp.append(u) seenE[ind] = 1 if temp: for u in temp: seenV[u] = 1 ans[u] = 1 while True: if ans[-1] == 0: ans.pop() else: break ans.reverse() print(*ans, sep="")