N,M = map(int,input().split()) lsg = [[] for i in range(N)] setv = set() for i in range(M): a,b = map(int,input().split()) lsg[a].append(b) lsg[b].append(a) if a > b: a,b = b,a setv.add((a,b)) lsans = [0]*(N) for i in range(N-1,-1,-1): if lsans[i] == 1: for j in lsg[i]: if (j,i) in setv: setv.remove((j,i)) else: for j in lsg[i]: if (j,i) in setv: setv.remove((j,i)) lsans[j] = 1 while lsans[-1] == 0: lsans.pop() lsans.reverse() print(*lsans,sep='')