import sys input = sys.stdin.buffer.readline sys.setrecursionlimit(10 ** 7) 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) seen = [0] * N buy = [0] * N for s in reversed(range(N)): if seen[s]: continue seen[s] = 1 for t in G[s]: if seen[t]: continue buy[t] = 1 seen[t] = 1 while buy and buy[-1] == 0: buy.pop() buy.reverse() print(*buy, sep="")