Dima came to the horse land. There are n horses living in the land. Each horse in the horse land has several enemies (enmity is a symmetric relationship). The horse land isn't very hostile, so the number of enemies of each horse is at most 3.Right now the horse land is going through an election campaign. So the horses trusted Dima to split them into two parts. At that the horses want the following condition to hold: a horse shouldn't have more than one enemy in its party.Help Dima split the horses into parties. Note that one of the parties can turn out to be empty.

The first line contains two integers n, m  — the number of horses in the horse land and the number of enemy pairs. Next m lines define the enemy pairs. The i-th line contains integers ai, bi (1 ≤ ai, bi ≤ n; ai ≠ bi), which mean that horse ai is the enemy of horse bi. Consider the horses indexed in some way from 1 to n. It is guaranteed that each horse has at most three enemies. No pair of enemies occurs more than once in the input.

Print a line, consisting of n characters: the i-th character of the line must equal "0", if the horse number i needs to go to the first party, otherwise this character should equal "1". If there isn't a way to divide the horses as required, print -1.

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.StringTokenizer;

public class Test {
	static List<Integer> g[];
	static int team[];
	static boolean success = true;
	public static boolean check(int v){
		int a = 0;
		boolean ret = false;
		for(int i = 0; i < g[v].size(); ++i){
			if(team[v] == team[g[v].get(i)]) ++a;
		}
		if(a > 1) return false;
		else return true;

	}
	public static void main(String[] argv) {
		FastScanner scan = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int m = scan.nextInt();
		boolean used[] = new boolean[n+1];
		team = new int[n+2];
		g = new ArrayList[n+1];
		for(int i = 0; i < n + 1; ++i){
			g[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; ++i){
			int f = scan.nextInt();
			int t = scan.nextInt();
			g[f].add(t);
			g[t].add(f);
		}

		Queue<Integer> q = new LinkedList();
		for(int i = 1; i <= n; ++i){
			if(g[i].size() > 0)
				q.add(i);
		}

		while(!q.isEmpty()) {
			int node = q.poll();
			if(!check(node)){
				if(team[node] == 0) team[node] = 1;
				else team[node] = 0;
				for(int i = 0; i < g[node].size(); ++i){
					if(!check(g[node].get(i))){
						q.add(g[node].get(i));
					}
				}
			}
		}

		for(int i = 1; i < n + 1; ++i)
			out.print(team[i]);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(InputStream is) {
			try {
				br = new BufferedReader(new InputStreamReader(is));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					return null;
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.valueOf(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.IOError;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF272E {

	final int maxn = 300030;
	ArrayList[] adj = new ArrayList[maxn];
	boolean[] vis = new boolean[maxn];
	int[] color = new int[maxn];
	FastIO scan = new FastIO();
	PrintWriter cout = new PrintWriter(System.out);

	void dfs(int u) {
		vis[u] = true;
		int cnt = 0;
		for (int i = 0; i < adj[u].size(); i++) {
			int v = (int) adj[u].get(i);
			if (color[u] == color[v]) {
				cnt++;
			}
		}
		if (cnt >= 2) {
			color[u] = 1 - color[u];
			for (int i = 0; i < adj[u].size(); i++) {
				int v = (int) adj[u].get(i);
				dfs(v);
			}
		}
	}

	void run() {
		for (int i = 0; i < maxn; i++)
			adj[i] = new ArrayList<Integer>();
		int n = scan.nextInt();
		int m = scan.nextInt();
		for (int i = 0; i < m; i++) {
			int u = scan.nextInt();
			int v = scan.nextInt();
			adj[u].add(v);
			adj[v].add(u);
		}
		for (int i = 1; i <= n; i++) {
			if (vis[i] == false)
				dfs(i);
		}
		for (int i = 1; i <= n; i++)
			cout.print(color[i]);
		cout.println();
		cout.flush();
	}

	public static void main(String args[]) {
		new CF272E().run();
	}

	public class FastIO {
		BufferedReader br;
		StringTokenizer st;
		PrintWriter out;

		public FastIO(InputStream in, OutputStream o) {
			br = new BufferedReader(new InputStreamReader(in));
			out = new PrintWriter(new OutputStreamWriter(o));
			eat("");
		}

		public FastIO() {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			eat("");
		}

		public void eat(String s) {
			st = new StringTokenizer(s);
		}

		public String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				throw new IOError(e);
			}
		}

		public boolean hasNext() {
			while (!st.hasMoreTokens()) {
				String s = nextLine();
				if (s == null)
					return false;
				eat(s);
			}
			return true;
		}

		public String next() {
			hasNext();
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public void print(String ans) {
			out.print(ans);
			out.flush();
		}

		public void println(String ans) {
			out.println(ans);
			out.flush();
		}

		public void close() {
			out.close();
		}

	}
}

import java.util.ArrayDeque;
import java.util.LinkedList;
import java.util.StringTokenizer;

public class Solution {
    //<editor-fold desc="input parse" defaultstate="collapsed">

    private static StringTokenizer st;
    private static java.io.BufferedReader reader;
    private static java.io.BufferedWriter writer;

    private static long nextLong() {
        return Long.parseLong(st.nextToken());
    }

    private static int nextInt() {
        return Integer.parseInt(st.nextToken());
    }

    private static double nextDouble() {
        return Double.parseDouble(st.nextToken());
    }

    private static short nextShort() {
        return Short.parseShort(st.nextToken());
    }

    private static byte nextByte() {
        return Byte.parseByte(st.nextToken());
    }

    private static void initTokenizer() throws Exception {
        st = new StringTokenizer(reader.readLine());
    }

    //</editor-fold>

    static boolean[] color;

    static LinkedList<Integer>[] enemies;

    static boolean isCorrect (int v) {
	boolean encountered = false;

	for (int e : enemies[v]) {
	    if (color[e] == color[v]) {
		if (encountered) return false;
		else encountered = true;
	    }
	}

	return true;
    }

    public static void main(String[] args) throws Exception {
	reader = new java.io.BufferedReader(new java.io.InputStreamReader(System.in), 1 << 20);
	writer = new java.io.BufferedWriter(new java.io.OutputStreamWriter(System.out));
	//reader = new java.io.BufferedReader(new java.io.FileReader("input.txt"), 1 << 20);
	//writer = new java.io.BufferedWriter(new java.io.FileWriter("output.txt"));

	initTokenizer();
	int n = nextInt();
	int m = nextInt();

	enemies = new LinkedList[n];

	for (int i = 0; i < n; i++) {
	    enemies[i] = new LinkedList<>();
	}

	color = new boolean[n];

	for (int i = 0; i < m; i++) {
	    initTokenizer();
	    int a = nextInt() - 1;
	    int b = nextInt() - 1;

	    enemies[a].add(b);
	    enemies[b].add(a);
	}

	ArrayDeque<Integer> tocheck = new ArrayDeque<>(n);

	for (int i = 0; i < n; i++) {
	    if (!isCorrect(i)) tocheck.add(i);
	}

	while (!tocheck.isEmpty()) {
	    int v = tocheck.pollFirst();

	    if (!isCorrect(v)) {
		color[v] = !color[v];
		for (int e : enemies[v]) {
		    if (!isCorrect(e)) tocheck.add(e);
		}
	    }
	}

	for (int i = 0; i < n; i++) {
	    writer.write(color[i] ? '0' : '1');
	}

	writer.close();
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	int n, m;
	int g[][];
	int [] whites, blacks, color;
	int [] relax;

	void paint (int v, int c) {
		for (int i = 0; i < g[v].length; i++) {
			int to = g[v][i];
			if (color[v] == 0)
				whites[to]--;
			else if (color[v] == 1)
				blacks[to]--;
			if (c == 0)
				whites[to]++;
			else
				blacks[to]++;
		}
		if (color[v] != -1)
			relax[v]++;
		if (relax[v] > 4)
			while (true);
		color[v] = c;
	}

	void dfs (int v, int pre) {
		if (whites[v] == 2) {
			paint (v, 1);
			for (int i = 0; i < g[v].length; i++) {
				int to = g[v][i];
				if (to == pre) continue;
				if (color[to] == 1 && blacks[to] == 2)
					dfs (to, v);
			}
		} else if (blacks[v] == 2) {
			paint (v, 0);
			for (int i = 0; i < g[v].length; i++) {
				int to = g[v][i];
				if (to == pre) continue;
				if (color[to] == 0 && whites[to] == 2)
					dfs (to, v);
			}
		}
	}

	public void solve () throws Exception {
		n = sc.nextInt();
		m = sc.nextInt();
		g = new int [n][];

		int degree[] = new int [n];
		int edges [][] = new int [m][2];
		for (int i = 0; i < m; i++) {
			int v1 = sc.nextInt() - 1;
			int v2 = sc.nextInt() - 1;
			edges[i][0] = v1;
			edges[i][1] = v2;
			degree[v1]++;
			degree[v2]++;
		}
		for (int i = 0; i < n; i++) {
			g[i] = new int [degree[i]];
			degree[i] = 0;
		}

		for (int i = 0; i < m; i++) {
			int v1 = edges[i][0];
			int v2 = edges[i][1];
			g[v1][degree[v1]++] = v2;
			g[v2][degree[v2]++] = v1;
		}

		whites = new int [n];
		blacks = new int [n];
		color = new int [n];
		relax = new int [n];
		Arrays.fill(color, -1);

		for (int i = 0; i < n; i++) {
			if (whites[i] == 0) {
				paint (i, 0);
			} else if (blacks[i] == 0) {
				paint (i, 1);
			} else if (whites[i] == 1) {
				paint (i, 0);
			} else if (blacks[i] == 1) {
				paint (i, 1);
			}
			for (int j = 0; j < g[i].length; j++) {
				int to = g[i][j];
				dfs (to, i);
			}
		}

		for (int i = 0; i < n; i++)
			out.print(color[i]);

	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Solution.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Solution(), "", (1 << 26));
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.io.*;
import java.util.*;

public class Solution {
    public static void main (String args[]) throws FileNotFoundException {
        boolean online = "true".equals(System.getProperty("ONLINE_JUDGE"));
        if (online) {
            in = new Scanner(System.in);
            out = new PrintWriter(System.out);
        }
        else {
            in = new Scanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        }

        new Solution().run();

        out.close();
    }

    private int[][] g;
    private int[] k;
    private byte[] c;

    private void run () {
        int n = in.nextInt();
        g = new int[n][3];
        k = new int[n];

        int m = in.nextInt();
        for (int i = 0; i < m; ++i) {
            int u = in.nextInt()-1,
                v = in.nextInt()-1;
            g[u][k[u]++] = v;
            g[v][k[v]++] = u;
        }

        c = new byte[n];
        for (int i = 0; i < n; ++i)
            dfs(i);
        for (int i = 0; i < n; ++i)
            out.print(c[i]);
    }

    private void dfs (int u) {
        int cnt = 0;
        for (int i = 0; i < k[u]; ++i)
            if (c[u] == c[g[u][i]])
                ++cnt;
        if (cnt > 1) {
            c[u] ^= 1;
            for (int i = 0; i < k[u]; ++i) {
                int v = g[u][i];
                if (c[u] == c[v])
                    dfs(v);
            }
        }
    }

    private static Scanner in;
    private static PrintWriter out;
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class DimaAndHorses {
	static int[] locHorse;
	static List<List<Integer>> enemies;
	public static void main(String[] args){
		FastScanner sc= new FastScanner();

		int n = sc.nextInt();
		int m = sc.nextInt();

		//enemies[i] = list of enemies of horse i
		enemies = new ArrayList<List<Integer>>();
		for(int horse=0;horse<=n;horse++){
			enemies.add(new ArrayList<Integer>());
		}

		for(int i=1;i<=m;i++){
			int h1 = sc.nextInt();
			int h2 = sc.nextInt();
			enemies.get(h1).add(h2);
			enemies.get(h2).add(h1);
		}

		//all horse in group 0 initially
		locHorse = new int[n+1];
		for(int horse=1;horse<=n;horse++){
			jump(horse);
		}
		for(int horse=1;horse<=n;horse++){
			System.out.print(locHorse[horse]);
		}
	}

	public static void jump(int horse){
		int countEnemy = 0;
		for(Integer enemy : enemies.get(horse)){
			if(locHorse[enemy] == locHorse[horse]){
				countEnemy++;
			}
		}
		if(countEnemy >= 2){
			locHorse[horse] = locHorse[horse] == 0 ? 1 : 0;
			for(Integer enemy : enemies.get(horse)){
				if(locHorse[enemy] == locHorse[horse]){
					jump(enemy);
				}
			}
		}
	}

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(nextToken());
		}

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
}

import java.util.*;
import java.io.*;
public class Main {
static ArrayList<Integer>enemy[];
static boolean type[];
public static boolean change(int a){
	int cnt=0;
	for(int temp:enemy[a]){
		if(type[temp]==type[a])cnt++;
	}
	if(cnt > 1)return false;
	return true;
}
public static void main(String [] args) throws Exception{
	BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st=new StringTokenizer(bf.readLine());
	int n=Integer.parseInt(st.nextToken());
	int m=Integer.parseInt(st.nextToken());
	enemy=new ArrayList[n];
	for(int i=0;i<n;i++)
		enemy[i]=new ArrayList<Integer>();
	for(int i=0;i<m;i++){
	st=new StringTokenizer(bf.readLine());
	int a=Integer.parseInt(st.nextToken())-1;
	int b=Integer.parseInt(st.nextToken())-1;
	enemy[a].add(b);
	enemy[b].add(a);
	}
	Queue<Integer>q=new LinkedList<Integer>();
	for(int i=0;i<n;i++){
		if(enemy[i].size()> 1)q.add(i);
	}
	type=new boolean[n];
	while(!q.isEmpty()){
		int node=q.remove();
		if(!change(node)){
		type[node] = !type[node];
		for(int temp:enemy[node])
			if(!change(temp))q.add(temp);
		}
	}
	StringBuilder sb=new StringBuilder();
	for(int i=0;i<n;i++){
		if(type[i])sb.append(0);
		else sb.append(1);
	}
	System.out.print(sb);
}
}

import java.util.*;
import java.io.*;
public class Main {
static ArrayList<Integer>enemy[];
static boolean type[];
public static boolean change(int a){
	int cnt=0;
	for(int temp:enemy[a]){
		if(type[temp]==type[a])cnt++;
	}
	if(cnt > 1)return false;
	return true;
}
public static void main(String [] args) throws Exception{
	BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st=new StringTokenizer(bf.readLine());
	int n=Integer.parseInt(st.nextToken());
	int m=Integer.parseInt(st.nextToken());
	enemy=new ArrayList[n];
	for(int i=0;i<n;i++)
		enemy[i]=new ArrayList<Integer>();
	for(int i=0;i<m;i++){
	st=new StringTokenizer(bf.readLine());
	int a=Integer.parseInt(st.nextToken())-1;
	int b=Integer.parseInt(st.nextToken())-1;
	enemy[a].add(b);
	enemy[b].add(a);
	}
	Stack<Integer>q=new Stack<Integer>();
	for(int i=0;i<n;i++){
		if(enemy[i].size()> 1)q.add(i);
	}
	type=new boolean[n];
	while(!q.isEmpty()){
		int node=q.pop();
		if(!change(node)){
		type[node] = !type[node];
		for(int temp:enemy[node])
			if(!change(temp))q.add(temp);
		}
	}
	StringBuilder sb=new StringBuilder();
	for(int i=0;i<n;i++){
		if(type[i])sb.append(0);
		else sb.append(1);
	}
	System.out.print(sb);
}
}

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Set;
import java.util.SortedSet;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

public class Main
{
	/********************************************** a list of common variables **********************************************/
	private MyScanner scan = new MyScanner();
	private PrintWriter out = new PrintWriter(System.out);
	private final int SIZEN = (int)(1e5);
	private final int MOD = (int)(1e9 + 7);
	private final long MODH = 10000000007L, BASE = 10007;
	private final int[] DX = {0, 1, 0, -1}, DY = {-1, 0, 1, 0};
	private ArrayList<Integer>[] edge;
	private int[] ans;

	public void dfs(int u)
	{
		int cnt = 0;
		for(int v : edge[u])
		{
			if(ans[u] == ans[v])
			{
				++cnt;
			}
		}
		if(cnt > 1)
		{
			ans[u] = 1 - ans[u];
			for(int v : edge[u])
			{
				if(ans[u] == ans[v])
				{
					dfs(v);
				}
			}
		}
	}

	public void foo()
	{
		int n = scan.nextInt();
		int m = scan.nextInt();
		edge = new ArrayList[n + 1];
		for(int i = 1;i <= n;++i)
		{
			edge[i] = new ArrayList<Integer>();
		}
		for(int i = 0;i < m;++i)
		{
			int u = scan.nextInt();
			int v = scan.nextInt();
			edge[u].add(v);
			edge[v].add(u);
		}
		ans = new int[n + 1];
		for(int i = 1;i <= n;++i)
		{
			dfs(i);
		}
		for(int i = 1;i <= n;++i)
		{
			out.print(ans[i]);
		}
	}

	public static void main(String[] args)
	{
		Main m = new Main();
		m.foo();
		m.out.close();
	}

	/********************************************** a list of common algorithms **********************************************/
	/**
	 * 1---Get greatest common divisor
	 * @param a :	first number
	 * @param b :	second number
	 * @return		greatest common divisor
	 */
	public long gcd(long a, long b)
	{
		return 0 == b ? a : gcd(b, a % b);
	}

	/**
	 * 2---Get the distance from a point to a line
	 * @param x1	the x coordinate of one endpoint of the line
	 * @param y1	the y coordinate of one endpoint of the line
	 * @param x2	the x coordinate of the other endpoint of the line
	 * @param y2	the y coordinate of the other endpoint of the line
	 * @param x		the x coordinate of the point
	 * @param y		the x coordinate of the point
	 * @return		the distance from a point to a line
	 */
	public double getDist(long x1, long y1, long x2, long y2, long x, long y)
	{
		long a = y2 - y1;
		long b = x1 - x2;
		long c = y1 * (x2 - x1) - x1 * (y2 - y1);
		return Math.abs(a * x + b * y + c) / Math.sqrt(a * a + b * b);
	}

	/**
	 * 3---Get the distance from one point to a segment (not a line)
	 * @param x1	the x coordinate of one endpoint of the segment
	 * @param y1	the y coordinate of one endpoint of the segment
	 * @param x2	the x coordinate of the other endpoint of the segment
	 * @param y2	the y coordinate of the other endpoint of the segment
	 * @param x		the x coordinate of the point
	 * @param y		the y coordinate of the point
	 * @return		the distance from one point to a segment (not a line)
	 */
	public double ptToSeg(long x1, long y1, long x2, long y2, long x, long y)
	{
		double cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1);
		if(cross <= 0)
		{
			return (x - x1) * (x - x1) + (y - y1) * (y - y1);
		}
		double d = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
		if(cross >= d)
		{
			return (x - x2) * (x - x2) + (y - y2) * (y - y2);
		}
		double r = cross / d;
		double px = x1 + (x2 - x1) * r;
		double py = y1 + (y2 - y1) * r;
		return (x - px) * (x - px) + (y - py) * (y - py);
	}

	/**
	 * 4---KMP match, i.e. kmpMatch("abcd", "bcd") = 1, kmpMatch("abcd", "bfcd") = -1.
	 * @param t:	String to match.
	 * @param p:	String to be matched.
	 * @return		if can match, first index; otherwise -1.
	 */
	public int kmpMatch(char[] t, char[] p)
	{
		int n = t.length;
		int m = p.length;
		int[] next = new int[m + 1];
		next[0] = -1;
		int j = -1;
		for(int i = 1;i < m;++i)
		{
			while(j >= 0 && p[i] != p[j + 1])
			{
				j = next[j];
			}
			if(p[i] == p[j + 1])
			{
				++j;
			}
			next[i] = j;
		}
		j = -1;
		for(int i = 0;i < n;++i)
		{
			while(j >= 0 && t[i] != p[j + 1])
			{
				j = next[j];
			}
			if(t[i] == p[j + 1])
			{
				++j;
			}
			if(j == m - 1)
			{
				return i - m + 1;
			}
		}
		return -1;
	}

	/**
	 * 5---Get the hash code of a String
	 * @param	s:	input string
	 * @return	hash code
	 */
	public long hash(String s)
	{
		long key = 0, t = 1;
		for(int i = 0;i < s.length();++i)
		{
			key = (key + s.charAt(i) * t) % MODH;
			t = t * BASE % MODH;
		}
		return key;
	}

	class MyScanner
	{
	    private byte[] buf = new byte[1024];
	    private int curChar;
	    private int numChars;
	    BufferedInputStream bis = new BufferedInputStream(System.in);

	    public int read()
	    {
	        if (-1 == numChars)
	        {
	        	throw new InputMismatchException();
	        }
	        if (curChar >= numChars)
	        {
	            curChar = 0;
	            try
	            {
	                numChars = bis.read(buf);
	            }
	            catch (IOException e)
	            {
	                throw new InputMismatchException();
	            }
	            if (numChars <= 0)
	            {
	            	return -1;
	            }
	        }
	        return buf[curChar++];
	    }

	    public int nextInt()
	    {
	        int c = read();
	        while (isSpaceChar(c))
	        {
	        	c = read();
	        }
	        int sgn = 1;
	        if (c == '-')
	        {
	            sgn = -1;
	            c = read();
	        }
	        int res = 0;
	        do
	        {
	            if (c < '0' || c > '9')
	            {
	            	throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public long nextLong()
	    {
	    	int c = read();
	    	while (isSpaceChar(c))
	    	{
	    		c = read();
	    	}
	    	int sgn = 1;
	    	if (c == '-')
	    	{
	    		sgn = -1;
	    		c = read();
	    	}
	    	long res = 0;
	    	do
	    	{
	    		if (c < '0' || c > '9')
	    		{
	    			throw new InputMismatchException();
	    		}
	    		res *= 10;
	    		res += c - '0';
	    		c = read();
	    	} while (!isSpaceChar(c));
	    	return res * sgn;
	    }

	    public double nextDouble()
	    {
	        int c = read();
	        while (isSpaceChar(c))
	        {
	        	c = read();
	        }
	        int sgn = 1;
	        if (c == '-')
	        {
	            sgn = -1;
	            c = read();
	        }
	        double res = 0;
	        while (!isSpaceChar(c) && c != '.')
	        {
	            if (c == 'e' || c == 'E')
	            {
	            	return res * Math.pow(10, nextInt());
	            }
	            if (c < '0' || c > '9')
	            {
	            	throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c & 15;
	            c = read();
	        }
	        if (c == '.')
	        {
	            c = read();
	            double m = 1;
	            while (!isSpaceChar(c))
	            {
	                if (c == 'e' || c == 'E')
	                {
	                	return res * Math.pow(10, nextInt());
	                }
	                if (c < '0' || c > '9')
	                {
	                	throw new InputMismatchException();
	                }
	                m /= 10;
	                res += (c & 15) * m;
	                c = read();
	            }
	        }
	        return res * sgn;
	    }

	    public String next()
	    {
	        int c = read();
	        while (isSpaceChar(c))
	        {
	        	c = read();
	        }
	        StringBuilder res = new StringBuilder();
	        do
	        {
	            res.appendCodePoint(c);
	            c = read();
	        } while (!isSpaceChar(c));
	        return res.toString();
	    }

	    private boolean isSpaceChar(int c)
	    {
	        return ' ' == c || '\n' == c || '\r' == c || '\t' == c || -1 == c;
	    }
	}
}

import java.io.*;
import java.util.*;

public class CF272E {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int[][] vv = new int[n + 1][3];
		int m = Integer.parseInt(st.nextToken());
		while (m-- > 0) {
			st = new StringTokenizer(br.readLine());
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			for (int j = 0; j < 3; j++)
				if (vv[a][j] == 0) {
					vv[a][j] = b;
					break;
				}
			for (int j = 0; j < 3; j++)
				if (vv[b][j] == 0) {
					vv[b][j] = a;
					break;
				}
		}
		boolean[] cc = new boolean[n + 1];
		LinkedList<Integer> q = new LinkedList<>();
		for (int a = 1; a <= n; a++)
			q.addLast(a);
		while (!q.isEmpty()) {
			int a = q.removeFirst();
			int k = 0;
			for (int j = 0; j < 3; j++) {
				int b = vv[a][j];
				if (b > 0 && cc[b] == cc[a])
					k++;
			}
			if (k > 1) {
				cc[a] = !cc[a];
				for (int j = 0; j < 3; j++) {
					int b = vv[a][j];
					if (b > 0)
						q.addLast(b);
				}
			}
		}
		StringBuilder sb = new StringBuilder();
		for (int a = 1; a <= n; a++)
			sb.append(cc[a] ? "1" : "0");
		System.out.println(sb);
	}
}

import java.io.*;
import java.util.*;
public class j {
public static void main(String[] args) throws IOException {
    input.init(System.in);
    PrintWriter out = new PrintWriter(System.out);
    int n =input.nextInt(), m = input.nextInt();
    ArrayList<Integer>[] g = new ArrayList[n];
    for(int i = 0; i<n; i++)
    {
        g[i] = new ArrayList<Integer>();
    }
    for(int i = 0; i<m; i++)
    {
        int a = input.nextInt()-1, b = input.nextInt()-1;
        g[a].add(b);
        g[b].add(a);
    }
    int[] degs = new int[n];
    for(int i = 0; i<n; i++) degs[i] = g[i].size();
    int[] id = new int[n];
    Queue<Integer> q = new LinkedList<Integer>();
    for(int i = 0; i<n; i++)
    {
        if(degs[i] >= 2)
        {
            q.add(i);
        }
    }
    while(!q.isEmpty())
    {
        int at = q.poll();
        int dd = 0;
        for(int e : g[at]) if(id[e] == id[at]) dd++;
        if(dd < 2)
        {
            continue;
        }
        for(int e : g[at])
        {
            if(id[e] == id[at])
            {
                degs[e]--;
            }
            else
            {
                degs[e]++;
                if(degs[e] == 2)
                {
                    q.add(e);
                }
            }
        }
        degs[at] = g[at].size() - degs[at];
        id[at] = 1 - id[at];
    }
    for(int i = 0; i<n; i++) out.print(id[i]);

//  boolean check = false;
//  for(int i = 0; i<n; i++)
//      if(id[i] == 1) check = true;
//  out.println(check ? 2 : 1);
//  for(int i = 0; i<n; i++) if(id[i] == 0) out.print((i+1)+" ");
//  out.println();
//  for(int i = 0; i<n; i++) if(id[i] == 1) out.print((i+1)+" ");
    out.close();
}

public static class input {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) {
    reader = new BufferedReader(new InputStreamReader(input));
    tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
    while (!tokenizer.hasMoreTokens())
        tokenizer = new StringTokenizer(reader.readLine());
    return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
    return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
    return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
    return Long.parseLong(next());
    }
}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;
    static int time = 0;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[]cur = new int[n];
        LinkedList<Integer> q = new LinkedList();
        for(int i = 0; i < n; i++){
            if(map[i].size() > 1){
                q.add(i);
            }
        }
        while(!q.isEmpty()){
            int node = q.pollFirst();
            int c =  0;
            for(int j : map[node]){
                if(cur[j] == cur[node]){
                    c++;
                }
            }
            if(c > 1){
                cur[node] = 1 - cur[node];
                for(int j : map[node]){
                    if(cur[j] == cur[node]){
                        int x = 0;
                        for(int k : map[j]){
                            if(cur[k] == cur[j]){
                                x++;
                            }
                        }
                        if(x > 1){
                            q.add(j);
                        }
                    }
                }
            }
        }
        for(int i : cur){
            out.print(i);
        }
        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        TreeSet<Integer> set = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            q.add(i);
            set.add(i);
        }
        while (!q.isEmpty()) {
            int f = q.remove();
            set.remove(f);
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
            for (int x : adj[f]) {
                if (res[f] == res[x])
                    if (!set.contains(x)) {
                        q.add(x);
                        set.add(x);
                    }
            }
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;

public class DimaAndHorses3 {
    static int[] res;
    static ArrayList<Integer>[] adj;

    public static void dfs(int node) {
        int enemies = 0;
        for (int x : adj[node])
            if (res[x] == res[node])
                enemies++;
        if (enemies < 2)
            return;
        res[node] = 1 - res[node];
        for (int x : adj[node])
            if (res[node] == res[x])
                dfs(x);
    }

    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        res = new int[n];
        adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        for (int i = 0; i < n; i++)
            dfs(i);
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        for (int i = 0; i < n; i++)
            q.add(i);
        while (!q.isEmpty()) {
            int f = q.remove();
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
            for (int x : adj[f])
                q.add(x);
            q.add(f);
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        TreeSet<Integer> set = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            q.add(i);
            set.add(i);
        }
        while (!q.isEmpty()) {
            int f = q.remove();
            set.remove(f);
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
            for (int x : adj[f]) {
                if (res[f] == res[x])
                    if (!set.contains(x))
                        q.add(x);
            }
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        for (int i = 0; i < n; i++)
            q.add(i);
        while (!q.isEmpty()) {
            int f = q.remove();
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
            for (int x : adj[f]){
                if(res[f]==res[x])
                    q.add(x);
            }
            q.add(f);
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC
{
    static int N;
    static ArrayList<Integer>[] adjMat;
    static int[] col;

    static boolean verify()
    {
        boolean isDone=true;

        for( int i=1; i<=N; i++ )
        {
            int cnt=0;

            for( int nbr:adjMat[i])
            {
                if( col[nbr] == col[i])
                    cnt++;
            }

            if( cnt >=2 )
            {
                isDone=false;
                col[i]=1-col[i];
            }

        }

        return isDone;
    }

    static void solve() throws IOException
    {
        col=new int[N+1];
        Arrays.fill( col, 0 );

        boolean isValid=false;

        while( !isValid )
        {
            isValid=verify();
        }

        BufferedWriter out=new BufferedWriter( new OutputStreamWriter( System.out ));

        for( int i=1; i<=N; i++ )
            out.write( Integer.toString( col[i]));

        out.write("\n");
        out.close();
    }

    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ) );
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer( s );
        N=Integer.parseInt( tok.nextToken() );
        int m=Integer.parseInt( tok.nextToken() );
        adjMat=new ArrayList[N+1];
        for( int i=0; i<N+1; i++ )
            adjMat[i]=new ArrayList();
        while( m-- > 0 )
        {
            s=br.readLine();
            tok=new StringTokenizer( s );
            int a=Integer.parseInt( tok.nextToken() );
            int b=Integer.parseInt( tok.nextToken() );
            adjMat[a].add(b);
            adjMat[b].add(a);
        }
        solve();

    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC
{
    static int N;
    static ArrayList<Integer>[] adjMat;
    static int[] col;

    static boolean verify()
    {
        boolean isDone=true;

        for( int i=1; i<=N; i++ )
        {
            int cnt=0;

            for( int nbr:adjMat[i])
            {
                if( col[nbr] == col[i])
                    cnt++;
            }

            if( cnt >=2 )
            {
                isDone=false;
                col[i]=1-col[i];
            }

        }

        return isDone;
    }

    static void solve() throws IOException
    {
        col=new int[N+1];
        Arrays.fill( col, -1 );

        for( int i=1; i<=N; i++ )
        {
            int c1=0, c2=0;

            for( int nbr:adjMat[i])
            {
                if( col[nbr] == 0 )
                    c1++;

                if( col[nbr] == 1 )
                    c2++;
            }

            if( c1<=1 )
                col[i]=0;

            else
                col[i]=1;
        }

        boolean isValid=false;

        while( !isValid )
        {
            isValid=verify();
        }

        BufferedWriter out=new BufferedWriter( new OutputStreamWriter( System.out ));

        for( int i=1; i<=N; i++ )
            out.write( Integer.toString( col[i]));

        out.write("\n");
        out.close();
    }

    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ) );
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer( s );
        N=Integer.parseInt( tok.nextToken() );
        int m=Integer.parseInt( tok.nextToken() );
        adjMat=new ArrayList[N+1];
        for( int i=0; i<N+1; i++ )
            adjMat[i]=new ArrayList();
        while( m-- > 0 )
        {
            s=br.readLine();
            tok=new StringTokenizer( s );
            int a=Integer.parseInt( tok.nextToken() );
            int b=Integer.parseInt( tok.nextToken() );
            adjMat[a].add(b);
            adjMat[b].add(a);
        }
        solve();

    }
}

//package round167;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Queue;

public class C2 {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni(), m = ni();
		int[] from = new int[m];
		int[] to = new int[m];
		for(int i = 0;i < m;i++){
			from[i] = ni()-1;
			to[i] = ni()-1;
		}
		int[][] g = packU(n, from, to);
		int[] col = new int[n];
		Queue<Integer> q = new ArrayDeque<Integer>();
		for(int i = 0;i < n;i++){
			q.add(i);
		}
		while(!q.isEmpty()){
			int cur = q.poll();
			int[] ct = new int[2];
			for(int e : g[cur]){
				ct[col[e]]++;
			}
			if(ct[col[cur]] >= 2){
				col[cur] = 1-col[cur];
				for(int e : g[cur]){
					q.add(e);
				}
			}
		}
		for(int i = 0;i < n;i++){
			out.print(col[i]);
		}
		out.println();
	}

	static int[][] packU(int n, int[] from, int[] to) {
		int[][] g = new int[n][];
		int[] p = new int[n];
		for(int f : from)
			p[f]++;
		for(int t : to)
			p[t]++;
		for(int i = 0;i < n;i++)
			g[i] = new int[p[i]];
		for(int i = 0;i < from.length;i++){
			g[from[i]][--p[from[i]]] = to[i];
			g[to[i]][--p[to[i]]] = from[i];
		}
		return g;
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception { new C2().run(); }

	private byte[] inbuf = new byte[1024];
	private int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] G = new Integer [N][3]; int [] D = new int[N];
		for (@SuppressWarnings("unused") int i : rep(M)) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			G[x][D[x]++] = y;
			G[y][D[y]++] = x;
		}

		boolean [] R = new boolean[N];
		boolean [] V = new boolean[N];
		Queue<Integer> Q = new LinkedList<Integer>();

		for (int i : rep(N)) {
			Q.add(i);
			V[i] = true;
		}

		while(!Q.isEmpty()) {
			int U = Q.poll();
			V[U] = false;

			int Z = 0, W = -1;
			for (int j : rep(D[U]))
				if (R[U] == R[G[U][j]])
					++Z;
				else
					W = G[U][j];

			if (Z > 1) {
				R[U] = !R[U];
				if (W >= 0 && !V[W]) {
					Z = 0;
					for (int k : rep(D[W]))
						if (R[G[W][k]] == R[W])
							++Z;
					if (Z > 1) {
						Q.add(W);
						V[W] = true;
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i : rep(N))
			res[i] = R[i] ? '1' : '0';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static Iterable<Integer> rep(final int S, final int T) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new Iterator<Integer>() {
					int i = S;
					public void remove() { throw new UnsupportedOperationException(); }
					public Integer next() { return i++; }
					public boolean hasNext() { return i < T; }
				};
			}
		};
	}

	static Iterable<Integer> rep(int N) { return rep(0, N); }
	static Iterable<Integer> req(int S, int T) { return rep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

		BitSet R = new BitSet();
		Queue<Integer> Q = new LinkedList<Integer>();
		BitSet V = new BitSet();

		for (int i = 0; i < N; ++i) {
			Q.add(i);
			V.set(i);
		}

		while(!Q.isEmpty()) {
			int U = Q.poll(); V.clear(U);
			int Z = 0, W = -1;
			for (int j = 0; j < NE[U]; ++j)
				if (R.get(U) == R.get(E[U][j]))
					++Z;
				else
					W = E[U][j];

			if (Z > 1) {
				R.flip(U);
				if (W >= 0 && !V.get(W)) {
					Z = 0;
					for (int k = 0; k < NE[W]; ++k)
						if (R.get(E[W][k]) == R.get(W))
							++Z;
					if (Z > 1) {
						Q.add(W);
						V.set(W);
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = R.get(i) ? '1' : '0';

		//cprint(res);
		pw.println(new String(res));
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

		BitSet R = new BitSet();
		Queue<Integer> Q = new LinkedList<Integer>();
		BitSet V = new BitSet();

		for (int i = 0; i < N; ++i) {
			Q.add(i);
			V.set(i);
		}

		while(!Q.isEmpty()) {
			int U = Q.poll(); V.clear(U);
			int Z = 0, W = -1;
			for (int j = 0; j < NE[U]; ++j)
				if (R.get(U) == R.get(E[U][j]))
					++Z;
				else
					W = E[U][j];

			if (Z > 1) {
				R.flip(U);
				if (W >= 0 && !V.get(W)) {
					Z = 0;
					for (int k = 0; k < NE[W]; ++k)
						if (R.get(E[W][k]) == R.get(W))
							++Z;
					if (Z > 1) {
						Q.add(W);
						V.set(W);
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = R.get(i) ? '1' : '0';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

//		BitSet R = new BitSet();
//		BitSet V = new BitSet();
		boolean [] R = new boolean[N];
		boolean [] V = new boolean[N];
		Queue<Integer> Q = new LinkedList<Integer>();

		for (int i = 0; i < N; ++i) {
			Q.add(i);
			V[i] = true; // V.set(i);
		}

		while(!Q.isEmpty()) {
			int U = Q.poll(); V[U] = false; // V.clear(U);
			int Z = 0, W = -1;
			for (int j = 0; j < NE[U]; ++j)
//				if (R.get(U) == R.get(E[U][j]))
				if (R[U] == R[E[U][j]])
					++Z;
				else
					W = E[U][j];

			if (Z > 1) {
				R[U] = !R[U]; //R.flip(U);
				if (W >= 0 && !V[W]) { // !V.get(W)) {
					Z = 0;
					for (int k = 0; k < NE[W]; ++k)
//						if (R.get(E[W][k]) == R.get(W))
						if (R[E[W][k]] == R[W])
							++Z;
					if (Z > 1) {
						Q.add(W);
						V[W] = true; //V.set(W);
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = /* R.get(i) */ R[i] ? '1' : '0';

		//cprint(res);
		pw.println(new String(res));
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] G = new Integer [N][3]; int [] D = new int[N];
		for (@SuppressWarnings("unused") int i : rep(M)) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			G[x][D[x]++] = y;
			G[y][D[y]++] = x;
		}

		boolean [] R = new boolean[N];
		boolean [] V = new boolean[N];
		Queue<Integer> Q = new LinkedList<Integer>();

		for (int i : rep(N)) {
			Q.add(i);
			V[i] = true;
		}

		while(!Q.isEmpty()) {
			int U = Q.poll();
			V[U] = false;

			int Z = 0, W = -1;
			for (int j : rep(D[U]))
				if (R[U] == R[G[U][j]])
					++Z;
				else
					W = G[U][j];

			if (Z > 1) {
				R[U] = !R[U];
				if (W >= 0 && !V[W]) {
					Z = 0;
					for (int k : rep(D[W]))
						if (R[G[W][k]] == R[W])
							++Z;
					if (Z > 1) {
						Q.add(W);
						V[W] = true;
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i : rep(N))
			res[i] = R[i] ? '1' : '0';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [T-S]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

		int [] R = new int [N];
		Queue<Integer> Q = new LinkedList<Integer>();
		boolean [] V = new boolean [N];

		for (int i = 0; i < N; ++i) {
			Q.add(i);
			V[i] = true;
		}

		while(!Q.isEmpty()) {
			int U = Q.poll();
			V[U] = false;
			int Z = 0;
			for (int j = 0; j < NE[U]; ++j)
				if (R[U] == R[E[U][j]])
					++Z;
			if (Z > 1) {
				R[U] = 1 - R[U];
				for (int j = 0; j < NE[U]; ++j) {
					int X = E[U][j];
					if (!V[X]) {
						Z = 0;
						for (int k = 0; k < NE[X]; ++k)
							if (R[E[X][k]] == R[X])
								++Z;
						if (Z > 1) {
							Q.add(X);
							V[X] = true;
						}
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = R[i] == 0 ? '0' : '1';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next().toCharArray();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error(e);
			}
		}
		private final BufferedReader r;

		MyScanner () {
			this(new BufferedReader(new InputStreamReader(System.in)));
		}

		MyScanner(BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] G = new Integer [N][3]; int [] D = new int[N];
		for (@SuppressWarnings("unused") int i : rep(M)) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			G[x][D[x]++] = y;
			G[y][D[y]++] = x;
		}

		boolean [] R = new boolean[N];
		boolean [] V = new boolean[N];
		Queue<Integer> Q = new LinkedList<Integer>();

		for (int i : rep(N)) {
			Q.add(i);
			V[i] = true;
		}

		while(!Q.isEmpty()) {
			int U = Q.poll();
			V[U] = false;

			int Z = 0, W = -1;
			for (int j : rep(D[U]))
				if (R[U] == R[G[U][j]])
					++Z;
				else
					W = G[U][j];

			if (Z > 1) {
				R[U] = !R[U];
				if (W >= 0 && !V[W]) {
					Z = 0;
					for (int k : rep(D[W]))
						if (R[G[W][k]] == R[W])
							++Z;
					if (Z > 1) {
						Q.add(W);
						V[W] = true;
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i : rep(N))
			res[i] = R[i] ? '1' : '0';

		pw.println(new String(res));
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [T-S]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 12000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.util.*;

public class Solver {
	int n;
	Vector<Integer>[] g;
	int[] clr;

	boolean isBad(int num) {
		int cnt = 0;

		for (int i = 0; i < g[num].size(); i++) {
			int v = g[num].elementAt(i);

			if (clr[v] == clr[num]) cnt++;
		}

		return cnt > 1;
	}

	void solve() throws IOException {
	    StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
	    PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
	    in.nextToken();
	    int n = (int)in.nval;
	    in.nextToken();
		int m = (int)in.nval;
		g = new Vector[n];
		clr = new int[n];
		for (int i = 0; i < n; i++) g[i] = new Vector<Integer>();
		Vector<Integer> bad = new Vector<Integer>();
		boolean[] used = new boolean[n];

		for (int i = 0; i < m; i++) {
			in.nextToken();
			int u = (int)in.nval;
			in.nextToken();
			int v = (int)in.nval;
			u--;
			v--;

			g[u].add(v);
			g[v].add(u);
		}
		for (int i = 0; i < n; i++) {
			if (isBad(i)) {
				used[i] = true;
				bad.add(i);
			}
		}
		while (!bad.isEmpty()) {
			int v = bad.lastElement();
			bad.removeElementAt(bad.size() - 1);
			used[v] = false;
			if (!isBad(v)) continue;
			clr[v] = 1 - clr[v];
			for (int i = 0; i < g[v].size(); i++) {
				int w = g[v].elementAt(i);

				if (isBad(w) && !used[w]) {
					used[w] = true;
					bad.add(w);
				}
			}
		}
		for (int i = 0; i < n; i++) {
			out.print(clr[i]);
		}
		out.close();
	}

	public static void main(String[] args) throws IOException {
		(new Solver()).solve();
	}
}

import java.io.*;
import java.util.*;

public class Solver {
	int n;
	Vector<Integer>[] g;
	int[] clr;
	StringTokenizer st = new StringTokenizer("");
	BufferedReader in;
	PrintWriter out;

	String nextToken() throws IOException {
		while (!st.hasMoreTokens()) st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	boolean isBad(int num) {
		int cnt = 0;

		for (int i = 0; i < g[num].size(); i++) {
			int v = g[num].elementAt(i);

			if (clr[v] == clr[num]) cnt++;
		}

		return cnt > 1;
	}

	void solve() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
	    int n = nextInt();
		int m = nextInt();
		g = new Vector[n];
		clr = new int[n];
		for (int i = 0; i < n; i++) g[i] = new Vector<Integer>();
		//Vector<Integer> bad = new Vector<Integer>();
		Queue<Integer> bad = new LinkedList<Integer>();
		boolean[] used = new boolean[n];

		for (int i = 0; i < m; i++) {
			int u = nextInt() - 1;
			int v = nextInt() - 1;

			g[u].add(v);
			g[v].add(u);
		}
		for (int i = 0; i < n; i++) {
			if (isBad(i)) {
				used[i] = true;
				bad.add(i);
			}
		}
		while (!bad.isEmpty()) {
			int v = bad.poll();
			used[v] = false;
			if (!isBad(v)) continue;
			clr[v] = 1 - clr[v];
			for (int i = 0; i < g[v].size(); i++) {
				int w = g[v].elementAt(i);

				if (isBad(w) && !used[w]) {
					used[w] = true;
					bad.add(w);
				}
			}
		}
		for (int i = 0; i < n; i++) {
			out.print(clr[i]);
		}
		out.close();
	}

	public static void main(String[] args) throws IOException {
		(new Solver()).solve();
	}
}

import java.io.*;
import java.util.*;

public class Solver {
	int n;
	Vector<Integer>[] g;
	int[] clr;

	boolean isBad(int num) {
		int cnt = 0;

		for (int i = 0; i < g[num].size(); i++) {
			int v = g[num].elementAt(i);

			if (clr[v] == clr[num]) cnt++;
		}

		return cnt > 1;
	}

	void solve() throws IOException {
	    StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
	    PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
	    in.nextToken();
	    int n = (int)in.nval;
	    in.nextToken();
		int m = (int)in.nval;
		g = new Vector[n];
		clr = new int[n];
		for (int i = 0; i < n; i++) g[i] = new Vector<Integer>();
		//Vector<Integer> bad = new Vector<Integer>();
		Queue<Integer> bad = new LinkedList<Integer>();
		boolean[] used = new boolean[n];

		for (int i = 0; i < m; i++) {
			in.nextToken();
			int u = (int)in.nval;
			in.nextToken();
			int v = (int)in.nval;
			u--;
			v--;

			g[u].add(v);
			g[v].add(u);
		}
		for (int i = 0; i < n; i++) {
			if (isBad(i)) {
				used[i] = true;
				bad.add(i);
			}
		}
		while (!bad.isEmpty()) {
			int v = bad.poll();
			used[v] = false;
			if (!isBad(v)) continue;
			clr[v] = 1 - clr[v];
			for (int i = 0; i < g[v].size(); i++) {
				int w = g[v].elementAt(i);

				if (isBad(w) && !used[w]) {
					used[w] = true;
					bad.add(w);
				}
			}
		}
		for (int i = 0; i < n; i++) {
			out.print(clr[i]);
		}
		out.close();
	}

	public static void main(String[] args) throws IOException {
		(new Solver()).solve();
	}
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	int n, m;
	int g[][];
	int [] whites, blacks, color;

	void paint (int v, int c) {
		for (int i = 0; i < g[v].length; i++) {
			int to = g[v][i];
			if (color[v] == 0)
				whites[to]--;
			else if (color[v] == 1)
				blacks[to]--;
			if (c == 0)
				whites[to]++;
			else
				blacks[to]++;
		}
		color[v] = c;
	}

	void dfs (int v, int pre) {
		if (whites[v] == 2) {
			paint (v, 1);
			for (int i = 0; i < g[v].length; i++) {
				int to = g[v][i];
				if (to == pre) continue;
				if (color[to] == 1 && blacks[to] == 2)
					dfs (to, v);
			}
		} else if (blacks[v] == 2) {
			paint (v, 0);
			for (int i = 0; i < g[v].length; i++) {
				int to = g[v][i];
				if (to == pre) continue;
				if (color[to] == 0 && whites[to] == 2)
					dfs (to, v);
			}
		}
	}

	public void solve () throws Exception {
		n = sc.nextInt();
		m = sc.nextInt();
		g = new int [n][];

		int degree[] = new int [n];
		int edges [][] = new int [m][2];
		for (int i = 0; i < m; i++) {
			int v1 = sc.nextInt() - 1;
			int v2 = sc.nextInt() - 1;
			edges[i][0] = v1;
			edges[i][1] = v2;
			degree[v1]++;
			degree[v2]++;
		}
		for (int i = 0; i < n; i++) {
			g[i] = new int [degree[i]];
			degree[i] = 0;
		}

		for (int i = 0; i < m; i++) {
			int v1 = edges[i][0];
			int v2 = edges[i][1];
			g[v1][degree[v1]++] = v2;
			g[v2][degree[v2]++] = v1;
		}

		whites = new int [n];
		blacks = new int [n];
		color = new int [n];
		Arrays.fill(color, -1);

		for (int i = 0; i < n; i++) {
			if (whites[i] == 0) {
				paint (i, 0);
			} else if (blacks[i] == 0) {
				paint (i, 1);
			} else if (whites[i] == 1) {
				paint (i, 0);
			} else if (blacks[i] == 1) {
				paint (i, 1);
			}
			for (int j = 0; j < g[i].length; j++) {
				int to = g[i][j];
				dfs (to, i);
			}
		}

		for (int i = 0; i < n; i++)
			out.print(color[i]);

	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Solution.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Solution(), "", (1 << 26));
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.io.*;

import static java.lang.Math.*;
import java.util.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.sort;

public class Main {
	public static void main(String[] args) {
		if(new File("input.txt").exists())
			try {
				System.setIn(new FileInputStream("input.txt"));
			} catch (FileNotFoundException e1) {
				e1.printStackTrace();
			}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "kek", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		Locale.setDefault(Locale.US);
		solve();
		in.close();
		out.close();
	}
	int n, m;
	int type[];
	int deg[];
	int neigh[][];
	boolean atQueue[];
	Queue qu;

	void add(int a, int b){
		neigh[a][deg[a]++] = b;
	}

	int calcSum(int v){
		int ret = 0;
		for(int i = 0; i < deg[v]; i++)
			if(type[v] == type[neigh[v][i]]) ret++;
		return ret;
	}

	void solve() throws IOException{
		 n = nextInt();
		 qu = new Queue(n * 10);
		 m = nextInt();
		 type = new int[n];
		 deg = new int[n];
		 neigh = new int[n][3];
		 atQueue = new boolean[n];
		 for(int i = 0; i < m; i++){
			 int a = nextInt() - 1;
			 int b = nextInt() - 1;
			 add(a, b);
			 add(b, a);
		 }
		 for(int i = 0; i < n; i++)
			 if(deg[i] > 1){
				 qu.push(i);
				 atQueue[i] = true;
			 }
		 while(!qu.isEmpty()){
			 int e = qu.pop();
			 atQueue[e] = false;
			 if(calcSum(e) > 1)
				 type[e] = 1 - type[e];
			 for(int i = 0; i < deg[e]; i++){
				 int ne = neigh[e][i];
				 if(!atQueue[ne] && calcSum(ne) > 1){
					 qu.push(ne);
					 atQueue[ne] = true;
				 }
			 }
		 }
		 for(int i = 0; i < n; i++)
			 out.print(type[i]);
		 out.println();
	}

	class Queue{
		int m[];
		int h, t;
		Queue(int sz){
			m = new int[sz];
			h = t = 0;
		}
		void push(int x){
			m[t++] = x;
		}
		int pop(){
			return m[h++];
		}
		boolean isEmpty(){
			return h == t;
		}
	}

	String nextToken() throws IOException{
		while(!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	long nextLong() throws IOException{
		return Long.parseLong(nextToken());
	}
	int nextInt() throws IOException{
		return Integer.parseInt(nextToken());
	}
	double nextDouble() throws IOException{
		return Double.parseDouble(nextToken());
	}
}

import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class C {

	ArrayList<Integer>[] arr;
	int[] col;

	void dfs(int v, int num) {
		if (col[v] != 0) {
			return;
		}
		col[v] = num;
		for (int k = 0; k < arr[v].size(); k++) {
			int to = arr[v].get(k);
			dfs(to, 3 - num);
		}
	}

	void count() throws IOException {
		int n = nextInt();
		arr = new ArrayList[n];
		col = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = new ArrayList<>();
		}
		int m = nextInt();
		for (int i = 0; i < m; i++) {
			int st = nextInt() - 1;
			int en = nextInt() - 1;
			arr[st].add(en);
			arr[en].add(st);
		}
		ArrayList<Integer> ar = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			ar.add(i);
		}

		for (int i = 0; i < n; i++) {
			int v = ar.get(i);
			if (col[v] == 0) {
				dfs(v, 1);
			}
		}
		while (true) {
			boolean was = false;
			ar = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				ar.add(i);
			}
			Collections.shuffle(ar);
			for (int i = 0; i < n; i++) {
				int sum = 0;
				int v = ar.get(i);
				for (int k = 0; k < arr[v].size(); k++) {
					int to = arr[v].get(k);
					if (col[to] == col[v]) {
						sum++;
					}
				}
				if (sum > 1) {
					col[v] = 3 - col[v];
					was = true;
				}
			}
			if (!was) {
				break;
			}
		}
		for (int i = 0; i < n; i++) {
			out.print(col[i] - 1);
		}
		out.println();

	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer str;
	String readline;

	String nextToken() throws IOException {
		while (str == null || !str.hasMoreTokens()) {
			readline = in.readLine();
			if (readline == null) {
				return null;
			} else {
				str = new StringTokenizer(readline);
			}
		}
		return str.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		count();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new C().run();
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author vadimmm
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {

    private ArrayList<Integer>[] graph;
    private boolean[] color;
    private int vertexCounter, edgeCounter;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        vertexCounter = in.nextInt();
        edgeCounter = in.nextInt();
        graph = new ArrayList[vertexCounter];
        for (int i = 0; i < vertexCounter; ++i)
            graph[i] = new ArrayList<Integer>();
        color = new boolean[vertexCounter];
        int v, u;
        for (int i = 0; i < edgeCounter; ++i) {
            v = in.nextInt() - 1;
            u = in.nextInt() - 1;
            graph[v].add(u);
            graph[u].add(v);
        }
        boolean good = false;
        while (!good) {
            good = true;
            for (int vertex = 0; vertex < vertexCounter; ++vertex) {
                int degree = 0;
                for (int x : graph[vertex])
                    if (color[x] == color[vertex])
                        ++degree;
                if (degree > 1) {
                    good = false;
                    color[vertex] = !color[vertex];
                }
            }
        }
        for (boolean right : color)
            out.print(right ? 0 : 1);
    }

}

class InputReader {

    private static BufferedReader bufferedReader;
    private static StringTokenizer stringTokenizer;

    public InputReader(InputStream inputStream) {
        bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        stringTokenizer = null;
    }

    public String next() {
        while(stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            try {
                stringTokenizer = new StringTokenizer(bufferedReader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.util.ArrayDeque;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.Queue;
import java.util.Collection;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Niyaz Nigmatullin
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		FastPrinter out = new FastPrinter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, FastScanner in, FastPrinter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        int[] from = new int[m];
        int[] to = new int[m];
        for (int i = 0; i < m; i++) {
            from[i] = in.nextInt() - 1;
            to[i] = in.nextInt() - 1;
        }
        int[][] edges = GraphUtils.getEdgesUndirectedUnweighted(n, from, to);
        Queue<Integer> q = new ArrayDeque<Integer>();
        int[] color = new int[n];
        for (int i = 0; i < n; i++) {
            q.add(i);
        }
        boolean[] inq = new boolean[n];
        Arrays.fill(inq, true);
        while (!q.isEmpty()) {
            int v = q.poll();
            inq[v] = false;
            int cnt = 0;
            for (int j : edges[v]) {
                if (color[v] == color[j]) {
                    ++cnt;
                }
            }
            if (cnt < 2) {
                continue;
            }
            color[v] ^= 1;
            for (int j : edges[v]) {
                if (inq[j]) {
                    continue;
                }
                cnt = 0;
                for (int k : edges[j]) {
                    if (color[k] == color[j]) {
                        ++cnt;
                    }
                }
                if (cnt > 1) {
                    inq[j] = true;
                    q.add(j);
                }
            }
        }
        for (int i = 0; i < n; i++) {
            out.print(color[i]);
        }
        out.println();
    }
}

class FastScanner extends BufferedReader {

    boolean isEOF;

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
            if (isEOF && ret < 0) {
                throw new InputMismatchException();
            }
            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    static boolean isWhiteSpace(int c) {
        return c >= -1 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (!isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}

class GraphUtils {
    public static int[][] getEdgesUndirectedUnweighted(int n, int[] v, int[] u) {
        int[][] edges = new int[n][];
        int[] deg = getDegreeUndirected(n, v, u);
        for (int i = 0; i < n; i++) {
            edges[i] = new int[deg[i]];
        }
        int m = v.length;
        Arrays.fill(deg, 0);
        for (int i = 0; i < m; i++) {
            edges[v[i]][deg[v[i]]++] = u[i];
            edges[u[i]][deg[u[i]]++] = v[i];
        }
        return edges;
    }

    public static int[] getDegreeUndirected(int n, int[] v, int[] u) {
        int[] deg = new int[n];
        for (int i : v) {
            deg[i]++;
        }
        for (int i : u) {
            deg[i]++;
        }
        return deg;
    }

    }

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}
}

class Task {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        n = in.readInt();
        m = in.readInt();
        g = new ArrayList[n];
        for (int i = 0; i < n; i++)
            g[i] = new ArrayList<Integer>();
        for (int i = 0; i < m; i++){
            int a = in.readInt() - 1, b = in.readInt() - 1;
            g[a].add(b);
            g[b].add(a);
        }
        color = new int[n];
        count = new int[n];
        Arrays.fill(color, 0);
        Arrays.fill(count, 0);
        was = new boolean[n];
        Arrays.fill(was, false);
        for (int i = 0; i < n; i++)
            if (!was[i])
                dfs(i, 0);
        for (int i : color)
            out.print(i);
    }

    void dfs(int v, int clr){
        if (was[v])
            return ;
        was[v] = true;
        color[v] = clr;
        for (int to : g[v]){
            dfs(to, clr ^ 1);
            count[v] += color[to] == clr ? 1 : 0;
        }
        if (count[v] > 1)
            color[v] = clr ^ 1;
    }

    int n, m;
    int[] color, count;
    boolean[] was;
    ArrayList<Integer>[] g;
}

class InputReader {
    public InputReader(InputStream inputStream){
        in = new BufferedReader(new InputStreamReader(inputStream));
    }

    public InputReader(Reader reader){
        in = new BufferedReader(reader);
    }

    public String nextLine(){
        String res = null;
        try {
            res = in.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return res;
    }

    public String readWord(){
        while (tokenizer == null || !tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(nextLine());
        return tokenizer.nextToken();
    }

    public int readInt(){
        return Integer.parseInt(readWord());
    }

    private StringTokenizer tokenizer;
    private BufferedReader in;
}

class OutputWriter {
    public OutputWriter(OutputStream outputStream){
        out = new PrintWriter(new OutputStreamWriter(outputStream));
    }

    public OutputWriter(Writer writer){
        out = new PrintWriter(writer);
    }

    public void print(Object...args){
        int size = args.length;
        for (int i = 0; i < size; i++)
            out.print(args[i]);
    }

    public void close(){
        out.close();
    }

    private PrintWriter out;
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class M {

   boolean res[];
   int g[];
   List<List<Integer>> ll;
   int n, m;
   PriorityQueue<Integer> pq;

   private void solve() throws IOException {
      n = nextInt();
      m = nextInt();
      g = new int[n];
      res = new boolean[n];
      ll = new ArrayList<>(n);

      for (int i = 0; i < n; ++i)
         ll.add(new ArrayList<Integer>(3));

      for (int i = 0; i < m; ++i) {
         int u = nextInt() - 1;
         int v = nextInt() - 1;
         ++g[u];
         ++g[v];
         ll.get(u).add(v);
         ll.get(v).add(u);
      }

      pq = new PriorityQueue<>();
      for (int i = 0; i < n; ++i)
         if (g[i] >= 2)
            pq.add(i);

      while (!pq.isEmpty()) {
         int v = pq.poll();
         if (g[v] < 2)
            continue;
         inverse(v);
      }

      for (int i = 0; i < n; ++i)
         print(res[i] ? '1' : '0');
   }

   private void inverse(int v) {
      res[v] = !res[v];
      g[v] = 3 - g[v];
      for (Integer i : ll.get(v))
         if (res[i] == res[v]) {
            ++g[i];
            if (g[i] >= 2)
               pq.add(i);
         } else
            --g[i];
   }

   public static void main(String[] args) {
      new M().run();
   }

   public void run() {
      try {
         if (isFileIO) {
            pw = new PrintWriter(new File("output.out"));
            br = new BufferedReader(new FileReader("input.in"));
         } else {
            pw = new PrintWriter(System.out);
            br = new BufferedReader(new InputStreamReader(System.in));
         }
         solve();
         pw.close();
         br.close();
      } catch (IOException e) {
         System.err.println("IO Error");
      }
   }

   private void print(Object o) {
      pw.print(o);
   }

   private void println(Object o) {
      pw.println(o);
   }

   private void println() {
      pw.println();
   }

   int[] nextIntArray(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken());
      return arr;
   }

   int nextInt() throws IOException {
      return Integer.parseInt(nextToken());
   }

   long nextLong() throws IOException {
      return Long.parseLong(nextToken());
   }

   double nextDouble() throws IOException {
      return Double.parseDouble(nextToken());
   }

   private String nextToken() throws IOException {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
         tokenizer = new StringTokenizer(br.readLine());
      }

      return tokenizer.nextToken();
   }

   private BufferedReader br;
   private StringTokenizer tokenizer;
   private PrintWriter pw;
   private final boolean isFileIO = false;
}

import java.io.*;
import java.util.*;

public class C implements Runnable {
	public static void main(String[] args) {
		new Thread(new C()).run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}

		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public void solve() throws IOException {
		int n = nextInt();
		ArrayList<Integer>[] e = new ArrayList[n];
		for (int i = 0; i < e.length; i++) {
			e[i] = new ArrayList<Integer>();
		}

		int[] type = new int[n];
		int[] degree = new int[n];

		int m = nextInt();
		for (int i = 0; i < m; i++) {
			int u = nextInt() - 1;
			int v = nextInt() - 1;
			e[u].add(v);
			e[v].add(u);
		}

		for (int i = 0; i < degree.length; i++) {
			degree[i] = e[i].size();
		}

		Queue<Integer> q = new ArrayDeque<Integer>();
		for (int i = 0; i < degree.length; i++) {
			if (degree[i] >= 2)
				q.add(i);
		}

		// for (int i = 0; i < 3 * m; i++) {
		while (q.size() > 0) {
			int u = q.poll();
			if (degree[u] < 2)
				continue;
			type[u] = 1 - type[u];
			degree[u] = 0;
			for (int v : e[u]) {
				if (type[v] == type[u]) {
					degree[v]++;
					if (degree[v] >= 2)
						q.add(v);
					degree[u]++;
				} else {
					degree[v]--;
				}
			}
		}

		if (q.size() > 0) {
			out.println(-1);
			return;
		}

		for (int i = 0; i < degree.length; i++) {
			out.print(type[i]);
		}
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}

import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
    InputReader reader;
    PrintWriter writer;

    Main() {
        reader = new InputReader();
        writer = new PrintWriter(System.out);
    }

    public static void main(String[] args) {
        new Main().run();
    }

    public void run() {
        try {
            int n = reader.nextInt();
            int m = reader.nextInt();
            int[] degree = new int[n];
            int[][] graph = new int[n][3];
            for (int i = 0; i < m; ++ i) {
                int a = reader.nextInt() - 1;
                int b = reader.nextInt() - 1;
                graph[a][degree[a] ++] = b;
                graph[b][degree[b] ++] = a;
            }
            int[] color = new int[n];
            int[] conflict = degree.clone();
            Queue <Integer> queue = new LinkedList <Integer>();
            for (int i = 0; i < n; ++ i) {
                if (conflict[i] > 1) {
                    queue.offer(i);
                }
            }
            boolean[] visit = new boolean[n];
            Arrays.fill(visit, true);
            while (!queue.isEmpty()) {
                int u = queue.poll();
                visit[u] = false;
                if (conflict[u] <= 1) {
                    continue;
                }
                color[u] ^= 1;
                conflict[u] = degree[u] - conflict[u];
                for (int i = 0; i < degree[u]; ++ i) {
                    int v = graph[u][i];
                    conflict[v] += color[u] == color[v] ? 1 : -1;
                    if (conflict[v] > 1 && !visit[v]) {
                        visit[v] = true;
                        queue.offer(v);
                    }
                }
            }
            for (int i = 0; i < n; ++ i) {
                writer.print(color[i]);
            }
            writer.println();
        } catch (IOException ex) {
        }
        writer.close();
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    InputReader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    Integer nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}

import java.io.*;
import java.util.*;

public class R167qC {

    static ArrayList<Integer> g[];
    static boolean vis[];
    static int ans[];

    @SuppressWarnings("unchecked")
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();

        g = new ArrayList[n];
        for (int i = 0; i < n; i++)
            g[i] = new ArrayList<Integer>();

        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            g[a].add(b);
            g[b].add(a);
        }

        ans = new int[n];

        Queue<Integer> q = new LinkedList<Integer>();

        for (int i = 0; i < n; i++)
            if (g[i].size() > 1)
                q.add(i);

        while (!q.isEmpty()) {
            int c = q.remove();
            int bad = 0;
            for (int j = 0; j < g[c].size(); j++)
                if (ans[g[c].get(j)] == ans[c])
                    bad++;
            if (bad > 1) {
                ans[c] = 1 - ans[c];
                for (int j = 0; j < g[c].size(); j++)
                    q.add(g[c].get(j));
            }
        }

        for (int i = 0; i < n; i++)
            w.print(ans[i] == 0 ? '0' : '1');
        w.close();
    }

    static void dfs(int c) {
        int cnt[] = new int[3];
        int child[] = new int[4];
        int tot = 0;
        for (int next : g[c]) {
            if (!vis[next]) {
                vis[next] = true;
                dfs(next);
                cnt[ans[next]]++;
                child[tot++] = next;
            }
        }
        if (tot == 0)
            ans[c] = 2;
        else if (tot == 1) {
            if (ans[child[0]] <= 1)
                ans[c] = 1 - ans[child[0]];
            else {
                ans[c] = 0;
                ans[child[0]] = 1;
            }
        }
        else if (tot == 2) {
            if (cnt[2] == 0) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
            } else if (cnt[2] == 1) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1 - ans[c];
            } else if (cnt[2] == 2) {
                ans[c] = 0;
                ans[child[0]] = ans[child[1]] = 1;
            } else
                throw new RuntimeException();
        } else if (tot == 3) {
            if (cnt[0] <= cnt[1]) {
                ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 0;
            }
            else {
                ans[c] = 0;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1;
            }
        } else
            throw new RuntimeException();
    }

    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * Created by hama_du on 15/09/09.
 */
public class C {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int[] which = new int[n];
        int[][] graph = buildGraph(in, n, m);
        for (int i = 0; i < n ; i++) {
            int left = 0;
            int right = 0;
            for (int hostile : graph[i]) {
                if (which[hostile] == 1) {
                    left++;
                } else if (which[hostile] == -1) {
                    right++;
                }
            }
            which[i] = (left <= right) ? 1 : -1;
        }

        int[] que = new int[1000000];
        int qh = 0;
        int qt = 0;
        int[] enemyCount = new int[n];
        for (int i = 0; i < n ; i++) {
            for (int hostile : graph[i]) {
                if (which[hostile] == which[i]) {
                    enemyCount[i]++;
                }
            }
            if (enemyCount[i] >= 2) {
                que[qh++] = i;
            }
        }
        while (qt < qh) {
            int now = que[qt++];
            if (enemyCount[now] <= 1) {
                continue;
            }
            which[now] *= -1;
            enemyCount[now] = graph[now].length - enemyCount[now];
            for (int hostile : graph[now]) {
                if (which[hostile] == which[now]) {
                    enemyCount[hostile]++;
                    if (enemyCount[hostile] >= 2) {
                        que[qh++] = hostile;
                    }
                } else {
                    enemyCount[hostile]--;
                }
            }
        }

        for (int i = 0; i < n ; i++) {
            out.print(which[i] == 1 ? '0' : '1');
        }
        out.println();
        out.flush();
    }

    static int[][] buildGraph(InputReader in, int n, int m) {
        int[][] edges = new int[m][];
        int[][] graph = new int[n][];
        int[] deg = new int[n];
        for (int i = 0 ; i < m ; i++) {
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            deg[a]++;
            deg[b]++;
            edges[i] = new int[]{a, b};
        }
        for (int i = 0 ; i < n ; i++) {
            graph[i] = new int[deg[i]];
        }
        for (int i = 0 ; i < m ; i++) {
            int a = edges[i][0];
            int b = edges[i][1];
            graph[a][--deg[a]] = b;
            graph[b][--deg[b]] = a;
        }
        return graph;
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}

import java.util.List;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Writer;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Arif
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    static class Node {
        int id;
        List<Node> adj = new ArrayList<Node>(0);
        int group;
        int[] num_edge_to_group;
    }

    void dfs(Node[] nodes, Node cur) {
        if (cur.num_edge_to_group[cur.group] <= 1) {
            return;
        }
        // change group
        int cur_group = cur.group;
        int next_group = 1 - cur.group;
        for (Node v : cur.adj) {
            v.num_edge_to_group[cur_group]--;
            v.num_edge_to_group[next_group]++;
        }
        cur.group = next_group;
        for (Node v : cur.adj) {
            dfs(nodes, v);
        }
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        Node[] nodes = new Node[n];
        for (int i = 0; i < n; ++i) {
            nodes[i] = new Node();
            nodes[i].id = i;
            nodes[i].group = -1;
            nodes[i].num_edge_to_group = new int[2];
        }

        int m = in.readInt();
        for (int i = 0; i < m; ++i) {
            int u = in.readInt() - 1;
            int v = in.readInt() - 1;
            nodes[u].adj.add(nodes[v]);
            nodes[v].adj.add(nodes[u]);
        }

        for (int i = 0; i < n; ++i) {
            Node u = nodes[i];
            u.group = 0;
            for (Node v : u.adj) {
                u.num_edge_to_group[0]++;
            }
        }

        for (Node u : nodes) dfs(nodes, u);

        for (int i = 0; i < n; ++i) {
            out.print(nodes[i].group);
        }
        out.printLine();
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        // InputMismatchException -> UnknownError
        if (numChars == -1)
            throw new UnknownError();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new UnknownError();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        } else if (c == '+') {
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

		int [] R = new int [N];
		Queue<Integer> Q = new LinkedList<Integer>();

		for (int i = 0; i < N; ++i)
			Q.add(i);

		while(!Q.isEmpty()) {
			int U = Q.poll();
			int Z = 0;
			for (int j = 0; j < NE[U]; ++j)
				if (R[U] == R[E[U][j]])
					++Z;
			if (Z > 1) {
				R[U] = 1 - R[U];
				for (int j = 0; j < NE[U]; ++j) {
					Z = 0;
					for (int k = 0; k < NE[E[U][j]]; ++k)
						if (R[E[E[U][j]][k]] == R[E[U][j]])
							++Z;
					if (Z > 1)
						Q.add(E[U][j]);
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = R[i] == 0 ? '0' : '1';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next().toCharArray();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error(e);
			}
		}
		private final BufferedReader r;

		MyScanner () {
			this(new BufferedReader(new InputStreamReader(System.in)));
		}

		MyScanner(BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class C {

    static StringTokenizer st;
    static BufferedReader in;
    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = nextInt();
        int m = nextInt();
        ArrayList<Integer>[]ages = new ArrayList[n+1];
        for (int i = 1; i <= n; i++) {
            ages[i] = new ArrayList<Integer>();
        }
        for (int i = 1; i <= m; i++) {
            int v1 = nextInt();
            int v2 = nextInt();
            ages[v1].add(v2);
            ages[v2].add(v1);
        }
        int[]c = new int[n+1];
        Queue<Integer> q = new LinkedList<Integer>();
        for (int i = 1; i <= n; i++) {
            q.add(i);
        }
        while (!q.isEmpty()) {
            int v = q.poll();
            int t = 0;
            for (int to : ages[v]) {
                if (c[to]==c[v])
                    t++;
            }
            if (t > 1) {
                c[v] = 1-c[v];
                for (int to : ages[v]) {
                    q.add(to);
                }
            }
        }
        for (int i = 1; i <= n; i++) {
            pw.print(c[i]);
        }
        pw.close();
    }
    private static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }

    private static long nextLong() throws IOException{
        return Long.parseLong(next());
    }

    private static double nextDouble() throws IOException{
        return Double.parseDouble(next());
    }

    private static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

	public void solve() throws IOException {
		int N = nextInt();
		int M = nextInt();
		int[] from = new int[M];
		int[] to = new int[M];
		for(int i = 0; i < M; i++){
			from[i] = nextInt()-1; to[i] = nextInt()-1;
		}
		int[][] enemies = new int[N][];
		int[] enemies_count = new int[N];
		for(int i = 0; i < M; i++){
			enemies_count[ from[i] ]++;
			enemies_count[ to[i] ]++;
		}
		for(int i = 0; i < N; i++){
			enemies[i] = new int[ enemies_count[i] ];
			enemies_count[i] = 0;
		}
		for(int i = 0; i < M; i++){
			enemies[ from[i] ][ enemies_count[from[i]]++] = to[i];
			enemies[ to[i] ][ enemies_count[to[i]]++] = from[i];
		}

		int[] type = new int[N];
		int[] same = new int[N];
		int[] incorrect = new int[M];
		int incorrect_count = 0;
		int incorrect_start = 0;
		for(int i = 0; i < N; i++){
			same[i] = enemies_count[i];
			if( same[i] >= 2){
				incorrect[ incorrect_count++ ] = i;
			}
		}

		while( incorrect_start < incorrect_count ){
			int v = incorrect[ incorrect_start++ ];
			if( same[v] < 2){
				// nothing
			}
			else{
				type[v] = 1 - type[v];
				for(int i = 0; i < enemies_count[v]; i++){
					int enemy = enemies[v][i];
					if( type[v] == type[enemy] ){
						same[enemy]++;
						same[v]++;
						if( same[enemy] == 2){
							incorrect[ incorrect_count++ ] = enemy;
						}
					}
					else{
						same[enemy]--;
						same[v]--;
					}
				}
			}
		}
		for(int i = 0; i < N; i++){
			out.print( type[i] );
		}
		out.println();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class ProblemC {
    void run() {
		FastScanner sc = new FastScanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		List<Integer>[] graph = new List[N];
		for (int i = 0; i < N; ++i) {
			graph[i] = new ArrayList<Integer>();
		}

		int[] enemy_count = new int[N];

		List<Integer> too_many = new ArrayList<Integer>();

		int[] partition = new int[N];

		for (int i = 0; i < M; ++i) {
			int h1 = sc.nextInt() - 1;
			int h2 = sc.nextInt() - 1;

			graph[h1].add(h2);
			graph[h2].add(h1);

			enemy_count[h1] += 1;
			enemy_count[h2] += 1;
		}

		for (int i = 0; i < N; ++i) {
			if (enemy_count[i] >= 2) {
				too_many.add(i);
			}
		}
		int count = 0;
		while (too_many.size() > 0) {
			count += 1;
			int horse = too_many.remove(too_many.size() - 1);
			if (enemy_count[horse] < 2) continue;
			int part = partition[horse];
			partition[horse] = 1-part;
			for (int enemy: graph[horse]) {
				if (partition[enemy] == part) {
					enemy_count[horse] -= 1;
					enemy_count[enemy] -= 1;
				} else {
					enemy_count[horse] += 1;
					enemy_count[enemy] += 1;
					if (enemy_count[enemy] == 2) {
						too_many.add(enemy);
					}
				}
			}
		}
		d(count);

		char[] out = new char[N];
		for (int i = 0; i < N; ++i) {
			if (partition[i] == 0) {
				out[i] = '0';
			} else {
				out[i] = '1';
			}
		}
		p("%s\n", new String(out));

    }

    boolean debug = false;
    void p(String f, Object...params) {
        System.out.printf(f, params);
    }
    void d(Object...params) {
        if (debug) {
            p("DEBUG: %s\n", Arrays.deepToString(params));
        }
    }
    static void die() {
        throw new RuntimeException();
    }
    public ProblemC(String[] args) {
        if (args.length > 0 && args[0].equals("debug")) {
            debug = true;
        }
    }
    public static void main(String[] args) {
        new ProblemC(args).run();
    }

	private static class FastScanner {
		private BufferedReader in;
		private StringTokenizer tok;
		public FastScanner(InputStream inputstream) {
			in = new BufferedReader(new InputStreamReader(inputstream));
			tok = null;
		}
		private void tokenizeLine() {
			try {
				String line = in.readLine();
				if (line == null) die();
				tok = new StringTokenizer(line);
			} catch (IOException e) {
				die();
			}
		}
		public String next() {
			while (tok == null || !tok.hasMoreTokens()) {
				tokenizeLine();
			}
			return tok.nextToken();
		}
		public boolean hasNextLine() {
			if (tok == null) {
				try {
					tokenizeLine();
				}
				catch (Exception e) {
					return false;
				}
			}
			return true;
		}
		public String nextLine() {
			if (tok == null) {
				tokenizeLine();
			}
			String ret = tok.hasMoreTokens() ? tok.nextToken("\n"): "";
			tok = null;
			return ret;
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.StringTokenizer;

public class Test {
	static List<Integer> g[];
	static int team[];
	static boolean success = true;
	public static void check(int v){
		int a = 0, b = 0;
		for(int i = 0; i < g[v].size(); ++i){
			if(team[g[v].get(i)] == 0) ++a;
			else ++b;
		}
		if(team[v] == 0){
			if(a > 1){
				team[v] = 1;
			}
		} else {
			if(b > 1){
				team[v] = 0;
			}
		}
	}
	public static void main(String[] argv) {
		FastScanner scan = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int m = scan.nextInt();
		boolean used[] = new boolean[n+1];
		team = new int[n+2];
		g = new ArrayList[n+1];
		for(int i = 0; i < n + 1; ++i){
			g[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; ++i){
			int f = scan.nextInt();
			int t = scan.nextInt();
			g[f].add(t);
			g[t].add(f);
		}
		for(int i = 1; i <= n; ++i){
			check(i);
		}

		for(int i = 1; i < n + 1; ++i)
			System.out.print(team[i]);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(InputStream is) {
			try {
				br = new BufferedReader(new InputStreamReader(is));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					return null;
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.valueOf(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.StringTokenizer;

public class Test {
	static List<Integer> g[];
	static int team[];
	static boolean success = true;
	public static boolean check(int v){
		int a = 0, b = 0;
		boolean ret = false;
		for(int i = 0; i < g[v].size(); ++i){
			if(team[g[v].get(i)] == 0) ++a;
			else ++b;
		}
		if(team[v] == 0){
			if(a > 1){
				team[v] = 1;
				ret = true;
			}
		} else {
			if(b > 1){
				team[v] = 0;
				ret = true;
			}
		}
		return ret;
	}
	public static void main(String[] argv) {
		FastScanner scan = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int m = scan.nextInt();
		boolean used[] = new boolean[n+1];
		team = new int[n+2];
		g = new ArrayList[n+1];
		for(int i = 0; i < n + 1; ++i){
			g[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; ++i){
			int f = scan.nextInt();
			int t = scan.nextInt();
			g[f].add(t);
			g[t].add(f);
		}
		for(int p = 1; p < m; ++p){
		for(int i = 1; i <= n; ++i){
			if(!check(i)){
				p = m;
			}
		}
		}

		for(int i = 1; i < n + 1; ++i)
			System.out.print(team[i]);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(InputStream is) {
			try {
				br = new BufferedReader(new InputStreamReader(is));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					return null;
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.valueOf(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.StringTokenizer;

public class Test {
	static List<Integer> g[];
	static int team[];
	static boolean success = true;
	public static boolean check(int v){
		int a = 0;
		boolean ret = false;
		for(int i = 0; i < g[v].size(); ++i){
			if(team[v] == team[g[v].get(i)]) ++a;
		}
		if(a > 1) return false;
		else return true;

	}
	public static void main(String[] argv) {
		FastScanner scan = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int m = scan.nextInt();
		boolean used[] = new boolean[n+1];
		team = new int[n+2];
		g = new ArrayList[n+1];
		for(int i = 0; i < n + 1; ++i){
			g[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; ++i){
			int f = scan.nextInt();
			int t = scan.nextInt();
			g[f].add(t);
			g[t].add(f);
		}

		Queue<Integer> q = new LinkedList();
		q.add(1);

		while(!q.isEmpty()) {
			int node = q.poll();
			if(!check(node)){
				if(team[node] == 0) team[node] = 1;
				else team[node] = 0;
				for(int i = 0; i < g[node].size(); ++i){
					if(!check(g[node].get(i))){
						q.add(g[node].get(i));
					}
				}
			}
		}

		for(int i = 1; i < n + 1; ++i)
			System.out.print(team[i]);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(InputStream is) {
			try {
				br = new BufferedReader(new InputStreamReader(is));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					return null;
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.valueOf(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.IOError;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF272E {

	final int maxn = 300030;
	ArrayList[] adj = new ArrayList[maxn];
	boolean[] vis = new boolean[maxn];
	int[] color = new int[maxn];
	FastIO scan = new FastIO();
	PrintWriter cout = new PrintWriter(System.out);

	void dfs(int u) {
		vis[u] = true;
		int cnt = 0;
		for (int i = 0; i < adj[u].size(); i++) {
			int v = (int) adj[u].get(i);
			if (color[u] == color[v]) {
				cnt++;
			}
		}
		if (cnt >= 2) {
			color[u] = 1 - color[u];
			for (int i = 0; i < adj[u].size(); i++) {
				int v = (int) adj[u].get(i);
				dfs(v);
			}
		}
	}

	void run() {
		for (int i = 0; i < maxn; i++)
			adj[i] = new ArrayList<Integer>();
		int n = scan.nextInt();
		int m = scan.nextInt();
		for (int i = 0; i < m; i++) {
			int u = scan.nextInt();
			int v = scan.nextInt();
			adj[u].add(v);
			adj[v].add(u);
		}
		for (int i = 1; i <= n; i++) {
			if (vis[i] == false)
				dfs(i);
		}
		for (int i = 1; i <= n; i++)
			cout.print(color[i]);
		cout.println();
	}

	public static void main(String args[]) {
		new CF272E().run();
	}

	public class FastIO {
		BufferedReader br;
		StringTokenizer st;
		PrintWriter out;

		public FastIO(InputStream in, OutputStream o) {
			br = new BufferedReader(new InputStreamReader(in));
			out = new PrintWriter(new OutputStreamWriter(o));
			eat("");
		}

		public FastIO() {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			eat("");
		}

		public void eat(String s) {
			st = new StringTokenizer(s);
		}

		public String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				throw new IOError(e);
			}
		}

		public boolean hasNext() {
			while (!st.hasMoreTokens()) {
				String s = nextLine();
				if (s == null)
					return false;
				eat(s);
			}
			return true;
		}

		public String next() {
			hasNext();
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public void print(String ans) {
			out.print(ans);
			out.flush();
		}

		public void println(String ans) {
			out.println(ans);
			out.flush();
		}

		public void close() {
			out.close();
		}

	}
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class DimaAndHorses {
	public static void main(String[] args){
		FastScanner sc= new FastScanner();

		int n = sc.nextInt();
		int m = sc.nextInt();

		//enemies[i] = list of enemies of horse i
		List<List<Integer>>enemies = new ArrayList<List<Integer>>();
		for(int horse=0;horse<=n;horse++){
			enemies.add(new ArrayList<Integer>());
		}

		for(int i=1;i<=m;i++){
			int h1 = sc.nextInt();
			int h2 = sc.nextInt();
			enemies.get(h1).add(h2);
			enemies.get(h2).add(h1);
		}

		//all horse in group 0 initially
		int[] locHorse = new int[n+1];
		for(int horse=1;horse<=n;horse++){
			int countEnemy = 0;
			//always exist a soln. if i get forced to pack to the other side
			//that means other side has <=1 horse enemy
			for(Integer enemy : enemies.get(horse)){
				if(locHorse[enemy] == locHorse[horse]){
					countEnemy++;
				}
			}
			if(countEnemy >= 2){
				locHorse[horse] = 1;
			}
			System.out.print(locHorse[horse]);
		}
	}

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(nextToken());
		}

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class DimaAndHorses {
	public static void main(String[] args){
		FastScanner sc= new FastScanner();

		int n = sc.nextInt();
		int m = sc.nextInt();

		//enemies[i] = list of enemies of horse i
		List<List<Integer>>enemies = new ArrayList<List<Integer>>();
		for(int horse=0;horse<=n;horse++){
			enemies.add(new ArrayList<Integer>());
		}

		for(int i=1;i<=m;i++){
			int h1 = sc.nextInt();
			int h2 = sc.nextInt();
			enemies.get(h1).add(h2);
			enemies.get(h2).add(h1);
		}

		//all horse in group 0 initially
		int[] locHorse = new int[n+1];
		for(int horse=1;horse<=n;horse++){
			int countEnemy = 0;
			//always exist a soln. if i get forced to pack to the other side
			//that means other side has <=1 horse enemy
			for(Integer enemy : enemies.get(horse)){
				if(enemy < horse && locHorse[enemy] == locHorse[horse]){
					countEnemy++;
				}
			}
			if(countEnemy >= 2){
				locHorse[horse] = 1;
			}
			System.out.print(locHorse[horse]);
		}
	}

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(nextToken());
		}

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
}

import java.util.*;
public class Main {
static ArrayList<Integer>enemy[];
static boolean type[];
public static boolean change(int a){
	int cnt=0;
	for(int temp:enemy[a]){
		if(type[temp]==type[a])cnt++;
	}
	if(cnt > 1)return false;
	return true;
}
public static void main(String [] args) {
	Scanner in=new Scanner(System.in);
	int n=in.nextInt();
	int m=in.nextInt();
	enemy=new ArrayList[n];
	for(int i=0;i<n;i++)
		enemy[i]=new ArrayList<Integer>();
	for(int i=0;i<m;i++){
	int a=in.nextInt()-1;
	int b=in.nextInt()-1;
	enemy[a].add(b);
	enemy[b].add(a);
	}
	Queue<Integer>q=new LinkedList<Integer>();
	for(int i=0;i<n;i++){
		if(enemy[i].size()> 1)q.add(i);
	}
	type=new boolean[n];
	while(!q.isEmpty()){
		int node=q.remove();
		if(!change(node)){
		type[node] = !type[node];
		for(int temp:enemy[node])
			if(!change(node))q.add(temp);
		}
	}
	StringBuilder sb=new StringBuilder();
	for(int i=0;i<n;i++){
		if(type[i])sb.append(0);
		else sb.append(1);
	}
	System.out.print(sb);
}
}

import java.io.*;
import java.util.*;
public class j {
public static void main(String[] args) throws IOException {
    input.init(System.in);
    PrintWriter out = new PrintWriter(System.out);
    int n =input.nextInt(), m = input.nextInt();
    ArrayList<Integer>[] g = new ArrayList[n];
    for(int i = 0; i<n; i++)
    {
        g[i] = new ArrayList<Integer>();
    }
    for(int i = 0; i<m; i++)
    {
        int a = input.nextInt()-1, b = input.nextInt()-1;
        g[a].add(b);
        g[b].add(a);
    }
    int[] degs = new int[n];
    for(int i = 0; i<n; i++) degs[i] = g[i].size();
    int[] id = new int[n];
    Queue<Integer> q = new LinkedList<Integer>();
    boolean[] bad = new boolean[n];
    for(int i = 0; i<n; i++)
    {
        if(degs[i] >= 2)
        {
            bad[i] = true;
            q.add(i);
        }
    }
    while(!q.isEmpty())
    {
        int at = q.poll();
        int dd = 0;
        for(int e : g[at]) if(id[e] == id[at]) dd++;
        if(dd < 2)
        {
            bad[at] = false;
            continue;
        }
        for(int e : g[at])
        {
            if(id[e] == id[at])
            {
                degs[e]--;
            }
            else
            {
                degs[e]++;
                if(degs[e] == 2)
                {
                    if(!bad[e])
                    {
                        bad[e] = true;
                        q.add(e);
                    }
                }
            }
        }
        degs[at] = g[at].size() - degs[at];
        id[at] = 1 - id[at];
    }
    for(int i = 0; i<n; i++) out.print(id[i]);

//  boolean check = false;
//  for(int i = 0; i<n; i++)
//      if(id[i] == 1) check = true;
//  out.println(check ? 2 : 1);
//  for(int i = 0; i<n; i++) if(id[i] == 0) out.print((i+1)+" ");
//  out.println();
//  for(int i = 0; i<n; i++) if(id[i] == 1) out.print((i+1)+" ");
    out.close();
}

public static class input {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) {
    reader = new BufferedReader(new InputStreamReader(input));
    tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
    while (!tokenizer.hasMoreTokens())
        tokenizer = new StringTokenizer(reader.readLine());
    return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
    return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
    return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
    return Long.parseLong(next());
    }
}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] >= 2) {
                    out.print(1);
                }else{
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {

        TreeSet<Point> q = new TreeSet<>((a, b) -> {
            if (a.x != b.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);

        });

        for (int i = 0; i < n; i++) {
            q.add(new Point(map[i].size(), i));
        }
        while (!q.isEmpty()) {
            Point p = q.pollFirst();
            if (check[p.y] <= 1) {
                check[p.y] = -1;
                for (int j : map[p.y]) {
                    if (check[j] >= 0) {
                        check[j]++;
                    }
                }
            }
        }
        //System.out.println(Arrays.toString(check));
        for (int i = 0; i < n; i++) {
            if (check[i] >= 2) {
                int c = 0;
                for (int j : map[i]) {
                    if (check[j] >= 2) {
                        c++;
                    }
                }
                if (c > 1) {
                    return false;
                }
            }
        }
        return true;
    }

    static class Edge {

        int u, v, c;

        public Edge(int u, int v, int c) {
            this.u = u;
            this.v = v;
            this.c = c;
        }

        @Override
        public String toString() {
            return "Edge{" + "u=" + (u + 1) + ", v=" + (v + 1) + ", c=" + c + '}';
        }

    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {

                out.print(check[i] - 1);
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        TreeSet<Edge> list = new TreeSet<>((a, b) -> {
            if (a.c != b.c) {
                return Integer.compare(b.c, a.c);
            }
            if (a.u != b.u) {
                return Integer.compare(a.u, b.u);
            }
            return Integer.compare(a.v, b.v);
        });
        for (int i = 0; i < n; i++) {
            for (int j : map[i]) {
                if (j > i) {
                    list.add(new Edge(i, j, map[i].size() + map[j].size() - 1));
                }
            }
        }
        while (!list.isEmpty()) {
            Edge e = list.pollFirst();
            if (check[e.u] == 0 && check[e.v] == 0) {
                check[e.u] = 1;
                check[e.v] = 1;
                for (int i : map[e.u]) {
                    if (i != e.u && i != e.v) {
                        check[i] = 2;
                    }
                }
                for (int i : map[e.v]) {
                    if (i != e.u && i != e.v) {
                        check[i] = 2;
                    }
                }

            }
        }
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                for (int j : map[i]) {
                    if (check[j] == 2) {
                        c++;
                    }
                }
                if (c > 1) {
                    return false;
                }
            }
        }
        return true;
    }

    static class Edge {

        int u, v, c;

        public Edge(int u, int v, int c) {
            this.u = u;
            this.v = v;
            this.c = c;
        }

    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] == 1) {
                    out.print(1);
                } else {
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        PriorityQueue<Point> q = new PriorityQueue<>((a, b) -> {
            if (b.x != a.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);
        });
        for (int i = 0; i < map.length; i++) {
            q.add(new Point(map[i].size(), i));
        }
        while (!q.isEmpty()) {
            Point p = q.poll();
            if (check[p.y] == 0) {
                check[p.y] = 1;
                int max = -1;
                int count = 0;
                for (int i : map[p.y]) {
                    if (check[i] == 0) {
                        if (max == -1 || map[max].size() < map[i].size()) {
                            max = i;
                        }
                        check[i] = 2;
                    } else {
                        count++;
                    }
                }
                if (max != -1 && count == 0) {
                    check[max] = 1;
                    for (int j : map[max]) {
                        if (j != p.y) {
                            check[j] = 2;
                        }
                    }
                }
            //    System.out.println(Arrays.toString(check));
            }
        }
        // System.out.println(Arrays.toString(check));

        boolean result = true;
        boolean[] other = new boolean[n];
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                for (int j : map[i]) {
                    if (other[j] && check[j] == 2) {
                        c++;
                    }
                    other[j] = true;
                }
                // System.out.println(i + " " + c);
                if (c > 1) {
                    return false;
                }
            }
        }
        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] == 1) {
                    out.print(1);
                } else {
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        PriorityQueue<Point> q = new PriorityQueue<>((a, b) -> {
            if (b.x != a.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);
        });
        for (int i = 0; i < map.length; i++) {
            q.add(new Point(map[i].size(), i));
        }
        while (!q.isEmpty()) {
            Point p = q.poll();
            if (check[p.y] == 0) {
                check[p.y] = 1;
                int max = -1;
                int count = 0;
                for (int i : map[p.y]) {

                    check[i] = 2;

                }
                //    System.out.println(Arrays.toString(check));
            }
        }
       // System.out.println(Arrays.toString(check));

        boolean result = true;
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                int d = 0;
                int node = -1;
                for (int j : map[i]) {
                    if (check[j] == 2) {
                        c++;
                    } else {
                        node = j;
                        d++;
                    }
                }

                if (c > 1) {
                    if (d <= 1) {
                        if(d == 1){
                            int a = 0;
                            for(int k : map[node]){
                                if(check[k] == 1){
                                    return false;
                                }
                            }

                        }

                        check[i] = 1;
                    } else {
                        return false;
                    }
                }

            }

        }

        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] == 1) {
                    out.print(1);
                } else {
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        PriorityQueue<Point> q = new PriorityQueue<>((a, b) -> {
            if (b.x != a.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);
        });
        for (int i = 0; i < map.length; i++) {
            q.add(new Point(map[i].size(), i));
        }
        while (!q.isEmpty()) {
            Point p = q.poll();
            if (check[p.y] == 0) {
                check[p.y] = 1;
                int max = -1;
                int count = 0;
                for (int i : map[p.y]) {

                    check[i] = 2;

                }
                //    System.out.println(Arrays.toString(check));
            }
        }
       // System.out.println(Arrays.toString(check));

        boolean result = true;
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                int d = 0;
                for (int j : map[i]) {
                    if (check[j] == 2) {
                        c++;
                    } else {
                        d++;
                    }
                }

                if (c > 1) {
                    if (d <= 1) {
                        check[i] = 1;
                    } else {
                        return false;
                    }
                }

            }

        }

        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {

                out.print(check[i] - 1);
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        TreeSet<Edge> list = new TreeSet<>((a, b) -> {
            if (a.c != b.c) {
                return Integer.compare(b.c, a.c);
            }
            if (a.u != b.u) {
                return Integer.compare(a.u, b.u);
            }
            return Integer.compare(a.v, b.v);
        });
        for (int i = 0; i < n; i++) {
            for (int j : map[i]) {
                if (j > i) {
                    list.add(new Edge(i, j, map[i].size() + map[j].size() - 1));
                }
            }
        }
        while (!list.isEmpty()) {
            Edge e = list.pollFirst();
            if (check[e.u] == 0 && check[e.v] == 0) {
                check[e.u] = 1;
                check[e.v] = 1;
                for (int i : map[e.u]) {
                    if (i != e.u && i != e.v) {
                        check[i] = 2;
                    }
                }
                for (int i : map[e.v]) {
                    if (i != e.u && i != e.v) {
                        check[i] = 2;
                    }
                }

            }
        }
        TreeSet<Point> q = new TreeSet<>((a, b) ->{
            if(a.x != b.x){
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);

        });
        int[]count = new int[n];

        for(int i = 0; i < n; i++){
            if(check[i] == 0){
                int c = 0;
                for(int j : map[i]){

                    if(check[j] == 2){
                        c++;
                    }
                }
                count[i] = c;
                q.add(new Point(c, i));
            }
        }
        while(!q.isEmpty()){
            Point p = q.pollFirst();
            if(check[p.y] == 0){
                check[p.y] = 1;
                for(int j : map[p.y]){
                    if(check[j] == 0){
                        check[j] = 2;
                    }
                }
            }
        }

        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                for (int j : map[i]) {
                    if (check[j] == 2) {
                        c++;
                    }
                }
                if (c > 1) {
                    return false;
                }
            }
        }
        return true;
    }

    static class Edge {

        int u, v, c;

        public Edge(int u, int v, int c) {
            this.u = u;
            this.v = v;
            this.c = c;
        }

    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] == 1) {
                    out.print(1);
                } else {
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        PriorityQueue<Point> q = new PriorityQueue<>((a, b) -> {
            if (b.x != a.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);
        });
        for (int i = 0; i < map.length; i++) {
            q.add(new Point(map[i].size(), i));
        }
        while (!q.isEmpty()) {
            Point p = q.poll();
            if (check[p.y] == 0) {
                check[p.y] = 1;
                int max = -1;
                int count = 0;
                for (int i : map[p.y]) {
                    check[i] = 2;

                }
                //    System.out.println(Arrays.toString(check));
            }
        }
        // System.out.println(Arrays.toString(check));

        boolean result = true;
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                q.add(new Point(map[i].size(), i));

            }

        }
        while (!q.isEmpty()) {
            Point p = q.poll();
            int i = p.y;
            int c = 0;
            int d = 0;
            int node = -1;
            for (int j : map[i]) {
                if (check[j] == 2) {
                    c++;
                } else {
                    node = j;
                    d++;
                }
            }

            if (c > 1) {
                if (d <= 1) {
                    if (d == 1) {
                        int a = 0;
                        for (int k : map[node]) {
                            if (check[k] == 1) {
                                return false;
                            }
                        }

                    }

                    check[i] = 1;
                } else {
                    return false;
                }
            }
        }

        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[] map = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            map[i] = new ArrayList();
        }
        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int[] check = new int[n];
        if (cal(check, n, map)) {
            for (int i = 0; i < n; i++) {
                if (check[i] == 1) {
                    out.print(1);
                } else {
                    out.print(0);
                }
            }
        } else {
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int[] check, int n, ArrayList<Integer>[] map) {
        TreeSet<Point> q = new TreeSet<>((a, b) -> {
            if (b.x != a.x) {
                return Integer.compare(b.x, a.x);
            }
            return Integer.compare(a.y, b.y);
        });
        int[] count = new int[n];
        for (int i = 0; i < map.length; i++) {
            q.add(new Point(map[i].size(), i));
            count[i] = map[i].size();
        }
        while (!q.isEmpty()) {
            Point p = q.pollLast();
            if (check[p.y] == 0) {
                check[p.y] = 1;
                int max = -1;
                int c = 0;
                for (int i : map[p.y]) {
                    Point tmp = new Point(count[i], i);
                    q.remove(tmp);
                    count[i]--;
                    q.add(tmp);
                    if (check[i] == 0) {
                        if (max == -1 || count[max] < count[i]) {
                            max = i;
                        }
                        check[i] = 2;
                    } else {
                        c++;
                    }
                }
                if (max != -1 && c == 0) {
                    check[max] = 1;
                    for (int j : map[max]) {
                        if (j != p.y) {
                            Point tmp = new Point(count[j], j);
                            q.remove(tmp);
                            count[j]--;
                            q.add(tmp);
                            check[j] = 2;
                        }
                    }
                }
                //    System.out.println(Arrays.toString(check));
            }
        }
       // System.out.println(Arrays.toString(check));

        boolean result = true;
        for (int i = 0; i < n; i++) {
            if (check[i] == 2) {
                int c = 0;
                for (int j : map[i]) {
                    if (check[j] == 2) {
                        c++;
                    }
                }
                // System.out.println(i + " " + c);
                if (c > 1) {
                    return false;
                }
            }
        }
        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class E_Round_167_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int m = in.nextInt();
        ArrayList<Integer>[]map = new ArrayList[n];
        for(int i = 0; i < n; i++){
            map[i] = new ArrayList();
        }
        for(int i = 0; i < m; i++){
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            map[a].add(b);
            map[b].add(a);
        }
        int []check = new int[n];
        if(cal(check, n, map)){
            for(int i = 0; i < n; i++){
                if(check[i] == 1){
                    out.print(1);
                }else{
                    out.print(0);
                }
            }
        }else{
            out.println(-1);
        }
        out.close();
    }

    public static boolean cal(int []check, int n, ArrayList<Integer>[]map){
        PriorityQueue<Point> q = new PriorityQueue<>((a,b)->(Integer.compare(b.x, a.x)));
        for(int i = 0; i < map.length; i++){
            q.add(new Point(map[i].size() , i));
        }
        while(!q.isEmpty()){
            Point p = q.poll();
            if(check[p.y] == 0){
                check[p.y] = 1;
                int max = -1;
                int count = 0;
                for(int i : map[p.y]){
                    if(check[i] == 0){
                        if(max == -1 || map[max].size() < map[i].size()){
                            max = i;
                        }
                        check[i] = 2;
                    }else{
                        count++;
                    }
                }
                if(max != -1 && count == 0){
                    check[max] = 1;
                }
            }
        }
       // System.out.println(Arrays.toString(check));

        boolean result = true;
        boolean[]other = new boolean[n];
        for(int i = 0; i < n; i++){
            if(check[i] == 2){
                int c = 0;
                for(int j : map[i]){
                    if(other[j] && check[j] == 2){
                        c++;
                    }
                    other[j] = true;
                }
               // System.out.println(i + " " + c);
                if(c > 1){
                    return false;
                }
            }
        }
        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        for (int i = 0; i < n; i++)
            q.add(i);
        while (!q.isEmpty()) {
            int f = q.remove();
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
            q.add(f);
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class DimaAndHorses2 {
    public static void main(String[] args) {
        InputReader r = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = r.nextInt(), m = r.nextInt();
        ArrayList<Integer>[] adj = new ArrayList[n];
        for (int i = 0; i < adj.length; i++) {
            adj[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < m; i++) {
            int from = r.nextInt() - 1;
            int to = r.nextInt() - 1;
            adj[from].add(to);
            adj[to].add(from);
        }
        int[] res = new int[n];
        Queue<Integer> q = new LinkedList<Integer>();
        TreeSet<Integer> set = new TreeSet<Integer>();
        for (int i = 0; i < n; i++) {
            q.add(i);
            set.add(i);
        }
        while (!q.isEmpty()) {
            int f = q.remove();
            set.remove(f);
            int enemies = 0;
            for (int x : adj[f])
                if (res[x] == res[f])
                    enemies++;
            if (enemies < 2)
                continue;
            res[f] = 1 - res[f];
//          for (int x : adj[f]) {
//              if (res[f] == res[x])
//                  if (!set.contains(x)){
//                      q.add(x);
//                      set.add(x);
//                  }
//          }
        }
        for (int x : res)
            out.print(x);
        out.close();
        return;
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}

import java.io.*;
import java.util.*;

public class Solution {
    public static void main (String args[]) throws FileNotFoundException {
        boolean online = "true".equals(System.getProperty("ONLINE_JUDGE"));
        if (online) {
            in = new Scanner(System.in);
            out = new PrintWriter(System.out);
        }
        else {
            in = new Scanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        }

        new Solution().run();

        out.close();
    }

    private void run () {
        int n = in.nextInt();

        ArrayList<Integer>[] g = new ArrayList[n];
        for (int i = 0; i < n; ++i)
            g[i] = new ArrayList<Integer>();

        int m = in.nextInt();
        for (int i = 0; i < m; ++i) {
            int u = in.nextInt()-1,
                v = in.nextInt()-1;
            g[u].add(v);
            g[v].add(u);
        }

        byte[] c = new byte[n];
        for (int i = 0; i < n; ++i) {
            int cnt = 0;
            for (int j = 0; j < g[i].size(); ++j)
                if (c[i] == c[g[i].get(j)])
                    ++cnt;
            if (cnt > 1) c[i] = 1;
            out.print(c[i]);
        }
    }

    private static Scanner in;
    private static PrintWriter out;
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC
{
    static int N;
    static ArrayList<Integer>[] adjMat;
    static HashSet<Integer> p1, p2;

    static boolean verify()
    {
        boolean isDone=true;

        for( int i=1; i<=N; i++ )
        {
            HashSet<Integer> curr, other;

            if( p1.contains(i))
            {
                curr=p1;
                other=p2;
            }

            else
            {
                curr=p2;
                other=p1;
            }

            int cnt=0;

            for( int nbr:adjMat[i])
            {
                if( curr.contains(nbr))
                    cnt++;
            }

            if( cnt >=2 )
            {
                isDone=false;
                curr.remove(i);
                other.add(i);
            }

        }

        return isDone;
    }

    static void solve() throws IOException
    {
        p1=new HashSet();
        p2=new HashSet();
        for( int i=1; i<=N; i++ )
        {
            int c1=0, c2=0;

            for( int nbr:adjMat[i])
            {
                if( p1.contains(nbr))
                    c1++;

                if( p2.contains(nbr))
                    c2++;
            }

            if( c1<=1 )
                p1.add(i);

            else
                p2.add(i);
        }

        boolean isValid=false;

        //while( !isValid )
        {
            isValid=verify();
        }

        BufferedWriter out=new BufferedWriter( new OutputStreamWriter( System.out ));

        for( int i=1; i<=N; i++ )
        {
            if( p1.contains(i))
                out.write("0");

            else
                out.write("1");

        }

        out.write("\n");
        out.close();

    }

    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ) );
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer( s );
        N=Integer.parseInt( tok.nextToken() );
        int m=Integer.parseInt( tok.nextToken() );
        adjMat=new ArrayList[N+1];
        for( int i=0; i<N+1; i++ )
            adjMat[i]=new ArrayList();
        while( m-- > 0 )
        {
            s=br.readLine();
            tok=new StringTokenizer( s );
            int a=Integer.parseInt( tok.nextToken() );
            int b=Integer.parseInt( tok.nextToken() );
            adjMat[a].add(b);
            adjMat[b].add(a);
        }
        solve();

    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC
{
    static int N;
    static ArrayList<Integer>[] adjMat;
    static HashSet<Integer> p1, p2;

    static void solve() throws IOException
    {
        p1=new HashSet();
        p2=new HashSet();
        for( int i=1; i<=N; i++ )
        {
            int c1=0, c2=0;

            for( int nbr:adjMat[i])
            {
                if( p1.contains(nbr))
                    c1++;

                if( p2.contains(nbr))
                    c2++;
            }

            if( c1<=1 )
                p1.add(i);

            else
                p2.add(i);
        }

        BufferedWriter out=new BufferedWriter( new OutputStreamWriter( System.out ));

        for( int i=1; i<=N; i++ )
        {
            if( p1.contains(i))
                out.write("0");

            else
                out.write("1");

        }

        out.write("\n");
        out.close();

    }

    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ) );
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer( s );
        N=Integer.parseInt( tok.nextToken() );
        int m=Integer.parseInt( tok.nextToken() );
        adjMat=new ArrayList[N+1];
        for( int i=0; i<N+1; i++ )
            adjMat[i]=new ArrayList();
        while( m-- > 0 )
        {
            s=br.readLine();
            tok=new StringTokenizer( s );
            int a=Integer.parseInt( tok.nextToken() );
            int b=Integer.parseInt( tok.nextToken() );
            adjMat[a].add(b);
            adjMat[b].add(a);
        }
        solve();

    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC
{
    static int N;
    static ArrayList<Integer>[] adjMat;
    static HashSet<Integer> p1, p2;

    static boolean verify()
    {
        boolean isDone=true;

        for( int i=1; i<=N; i++ )
        {
            HashSet<Integer> curr, other;

            if( p1.contains(i))
            {
                curr=p1;
                other=p2;
            }

            else
            {
                curr=p2;
                other=p1;
            }

            int cnt=0;

            for( int nbr:adjMat[i])
            {
                if( curr.contains(nbr))
                    cnt++;
            }

            if( cnt >=2 )
            {
                isDone=false;
                curr.remove(i);
                other.add(i);
            }

        }

        return isDone;
    }

    static void solve() throws IOException
    {
        p1=new HashSet();
        p2=new HashSet();
        int[] nCnt=new int[N+1];
        Arrays.fill( nCnt, 0 );

        for( int i=1; i<=N; i++ )
        {
            int c1=0, c2=0;
            boolean isC1=true, isC2=true;

            for( int nbr:adjMat[i])
            {
                if( p1.contains(nbr))
                {
                    c1++;
                    if( nCnt[nbr] >= 1 )
                        isC1=false;
                }

                if( p2.contains(nbr))
                {
                    c2++;
                    if( nCnt[nbr] >= 1 )
                        isC2=false;
                }
            }

            boolean done=false;
            if( ( c1<=1 ) && ( isC1 ))
            {
                p1.add(i);
                nCnt[i]=c1;
                for( int nbr:adjMat[i])
                {
                    if( p1.contains(nbr) )
                        nCnt[nbr]++;

                }
                done=true;
            }

            if( ( c2<=1 ) && ( isC2 ) && ( !done ))
            {
                p2.add(i);
                nCnt[i]=c2;
                for( int nbr:adjMat[i])
                {
                    if( p2.contains(nbr) )
                        nCnt[nbr]++;

                }
            }
        }

        boolean isValid=false;

        while( !isValid )
        {
            isValid=verify();
        }

        BufferedWriter out=new BufferedWriter( new OutputStreamWriter( System.out ));

        for( int i=1; i<=N; i++ )
        {
            if( p1.contains(i))
                out.write("0");

            else
                out.write("1");

        }

        out.write("\n");
        out.close();

    }

    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ) );
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer( s );
        N=Integer.parseInt( tok.nextToken() );
        int m=Integer.parseInt( tok.nextToken() );
        adjMat=new ArrayList[N+1];
        for( int i=0; i<N+1; i++ )
            adjMat[i]=new ArrayList();
        while( m-- > 0 )
        {
            s=br.readLine();
            tok=new StringTokenizer( s );
            int a=Integer.parseInt( tok.nextToken() );
            int b=Integer.parseInt( tok.nextToken() );
            adjMat[a].add(b);
            adjMat[b].add(a);
        }
        solve();

    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class M {

   private void solve() throws IOException {
      int n = nextInt();
      int m = nextInt();
      int g[] = new int[n];
      boolean res[] = new boolean[n];
      List<List<Integer>> ll = new ArrayList<>(n);
      for (int i = 0; i < n; ++i)
         ll.add(new ArrayList<Integer>(3));

      for (int i = 0; i < m; ++i) {
         int u = nextInt() - 1;
         int v = nextInt() - 1;
         ++g[u];
         ++g[v];
         ll.get(u).add(v);
         ll.get(v).add(u);
      }

      for (int i = 0; i < n; ++i) {
         if (g[i] == 2 || g[i] == 3) {
            res[i] = true;
            for (Integer j : ll.get(i))
               --g[j];
         }
      }

      for (int i = 0; i < n; ++i)
         print(res[i] ? '1' : '0');
   }

   public static void main(String[] args) {
      new M().run();
   }

   public void run() {
      try {
         if (isFileIO) {
            pw = new PrintWriter(new File("output.out"));
            br = new BufferedReader(new FileReader("input.in"));
         } else {
            pw = new PrintWriter(System.out);
            br = new BufferedReader(new InputStreamReader(System.in));
         }
         solve();
         pw.close();
         br.close();
      } catch (IOException e) {
         System.err.println("IO Error");
      }
   }

   private void print(Object o) {
      pw.print(o);
   }

   private void println(Object o) {
      pw.println(o);
   }

   private void println() {
      pw.println();
   }

   int[] nextIntArray(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken());
      return arr;
   }

   int nextInt() throws IOException {
      return Integer.parseInt(nextToken());
   }

   long nextLong() throws IOException {
      return Long.parseLong(nextToken());
   }

   double nextDouble() throws IOException {
      return Double.parseDouble(nextToken());
   }

   private String nextToken() throws IOException {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
         tokenizer = new StringTokenizer(br.readLine());
      }

      return tokenizer.nextToken();
   }

   private BufferedReader br;
   private StringTokenizer tokenizer;
   private PrintWriter pw;
   private final boolean isFileIO = false;
}

import java.io.*;
import java.util.*;

public class R167qC {

    static ArrayList<Integer> g[];
    static boolean vis[];
    static int ans[];

    @SuppressWarnings("unchecked")
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();

        g = new ArrayList[n];
        for (int i = 0; i < n; i++)
            g[i] = new ArrayList<Integer>();

        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            g[a].add(b);
            g[b].add(a);
        }

        ans = new int[n];
        vis = new boolean[n];
        for (int i = 0; i < n; i++) {
            if (!vis[i]) {
                vis[i] = true;
                dfs(i);
            }
        }

        for (int i = 0; i < n; i++)
            w.print(ans[i] == 0 ? '0' : '1');
        w.close();
    }

    static void dfs(int c) {
        int cnt[] = new int[3];
        int child[] = new int[4];
        int tot = 0;
        for (int next : g[c]) {
            if (!vis[next]) {
                vis[next] = true;
                dfs(next);
                cnt[ans[next]]++;
                child[tot++] = next;
            }
        }
        if (tot == 0)
            ans[c] = 2;
        else if (tot == 1) {
            if (ans[child[0]] <= 1)
                ans[c] = 1 - ans[child[0]];
            else {
                ans[c] = 0;
                ans[child[0]] = 1;
            }
        }
        else if (tot == 2) {
            if (cnt[2] == 0) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
            } else if (cnt[2] == 1) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1 - ans[c];
            } else if (cnt[2] == 2) {
                ans[c] = 0;
                ans[child[0]] = ans[child[1]] = 1;
            } else
                throw new RuntimeException();
        } else if (tot == 3) {
            if (cnt[0] <= cnt[1]) {
                ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 0;
            }
            else {
                ans[c] = 0;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1;
            }
        } else
            throw new RuntimeException();
    }

    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.io.*;
import java.util.*;

public class R167qC {

    static ArrayList<Integer> g[];
    static boolean vis[];
    static int ans[];

    @SuppressWarnings("unchecked")
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();

        g = new ArrayList[n];
        for (int i = 0; i < n; i++)
            g[i] = new ArrayList<Integer>();

        for (int i = 0; i < m; i++) {
            int a = in.nextInt() - 1;
            int b = in.nextInt() - 1;
            g[a].add(b);
            g[b].add(a);
        }

        ans = new int[n];
        vis = new boolean[n];
        for (int i = 0; i < n; i++) {
            if (!vis[i]) {
                vis[i] = true;
                dfs(i);
            }
        }

        for (int i = 0; i < n; i++)
            w.print(ans[i] == 0 ? '0' : '1');
        w.close();
    }

    static void dfs(int c) {
        int cnt[] = new int[3];
        int child[] = new int[4];
        int tot = 0;
        for (int next : g[c]) {
            if (!vis[next]) {
                vis[next] = true;
                dfs(next);
                cnt[ans[next]]++;
                child[tot++] = next;
            }
        }
        if (tot == 0)
            ans[c] = 0;
        else if (tot == 1) {
            if (ans[child[0]] <= 1)
                ans[c] = 1 - ans[child[0]];
            else {
                ans[c] = 0;
                ans[child[0]] = 1;
            }
        }
        else if (tot == 2) {
            if (cnt[2] == 0) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
            } else if (cnt[2] == 1) {
                if (cnt[0] <= cnt[1])
                    ans[c] = 0;
                else
                    ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1 - ans[c];
            } else if (cnt[2] == 2) {
                ans[c] = 0;
                ans[child[0]] = ans[child[1]] = 1;
            } else
                throw new RuntimeException();
        } else if (tot == 3) {
            if (cnt[0] <= cnt[1]) {
                ans[c] = 1;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 0;
            }
            else {
                ans[c] = 0;
                for (int j = 0; j < tot; j++)
                    if (ans[child[j]] == 2)
                        ans[child[j]] = 1;
            }
        } else
            throw new RuntimeException();
    }

    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * Created by hama_du on 15/09/09.
 */
public class C {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int[] which = new int[n];
        int[][] graph = buildGraph(in, n, m);
        for (int i = 0; i < n ; i++) {
            int left = 0;
            int right = 0;
            for (int hostile : graph[i]) {
                if (which[hostile] == 1) {
                    left++;
                } else if (which[hostile] == -1) {
                    right++;
                }
            }
            which[i] = (left <= right) ? 1 : -1;
        }

        int[] que = new int[1000000];
        int qh = 0;
        int qt = 0;
        int[] enemyCount = new int[n];
        for (int i = 0; i < n ; i++) {
            for (int hostile : graph[i]) {
                if (which[hostile] == which[i]) {
                    enemyCount[i]++;
                }
            }
            if (enemyCount[i] >= 2) {
                que[qh++] = i;
            }
        }
        while (qt < qh) {
            int now = que[qt++];
            which[now] *= -1;
            enemyCount[now] = graph[now].length - enemyCount[now];
            if (enemyCount[now] >= 1) {
                for (int hostile : graph[now]) {
                    if (which[hostile] == which[now]) {
                        enemyCount[hostile]++;
                        if (enemyCount[hostile] >= 2) {
                            que[qh++] = hostile;
                        }
                    } else {
                        enemyCount[hostile]--;
                    }
                }
            }
        }

        for (int i = 0; i < n ; i++) {
            out.print(which[i] == 1 ? '0' : '1');
        }
        out.println();
        out.flush();
    }

    static int[][] buildGraph(InputReader in, int n, int m) {
        int[][] edges = new int[m][];
        int[][] graph = new int[n][];
        int[] deg = new int[n];
        for (int i = 0 ; i < m ; i++) {
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            deg[a]++;
            deg[b]++;
            edges[i] = new int[]{a, b};
        }
        for (int i = 0 ; i < n ; i++) {
            graph[i] = new int[deg[i]];
        }
        for (int i = 0 ; i < m ; i++) {
            int a = edges[i][0];
            int b = edges[i][1];
            graph[a][--deg[a]] = b;
            graph[b][--deg[b]] = a;
        }
        return graph;
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * Created by hama_du on 15/09/09.
 */
public class C {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int[] which = new int[n];
        int[][] graph = buildGraph(in, n, m);
        for (int i = 0; i < n ; i++) {
            int left = 0;
            int right = 0;
            for (int hostile : graph[i]) {
                if (which[hostile] == 1) {
                    left++;
                } else if (which[hostile] == -1) {
                    right++;
                }
            }
            which[i] = (left <= right) ? 1 : -1;
        }

        int[] que = new int[1000000];
        int qh = 0;
        int qt = 0;
        int[] enemyCount = new int[n];
        for (int i = 0; i < n ; i++) {
            for (int hostile : graph[i]) {
                if (which[hostile] == which[i]) {
                    enemyCount[i]++;
                }
            }
            if (enemyCount[i] >= 2) {
                que[qh++] = i;
            }
        }
        while (qt < qh) {
            int now = que[qt++];
            if (enemyCount[now] <= 1) {
                continue;
            }
            which[now] *= -1;
            enemyCount[now] = graph[now].length - enemyCount[now];
            if (enemyCount[now] >= 1) {
                for (int hostile : graph[now]) {
                    if (which[hostile] == which[now]) {
                        enemyCount[hostile]++;
                        if (enemyCount[hostile] >= 2) {
                            que[qh++] = hostile;
                        }
                    } else {
                        enemyCount[hostile]--;
                    }
                }
            }
        }

        for (int i = 0; i < n ; i++) {
            out.print(which[i] == 1 ? '0' : '1');
        }
        out.println();
        out.flush();
    }

    static int[][] buildGraph(InputReader in, int n, int m) {
        int[][] edges = new int[m][];
        int[][] graph = new int[n][];
        int[] deg = new int[n];
        for (int i = 0 ; i < m ; i++) {
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            deg[a]++;
            deg[b]++;
            edges[i] = new int[]{a, b};
        }
        for (int i = 0 ; i < n ; i++) {
            graph[i] = new int[deg[i]];
        }
        for (int i = 0 ; i < m ; i++) {
            int a = edges[i][0];
            int b = edges[i][1];
            graph[a][--deg[a]] = b;
            graph[b][--deg[b]] = a;
        }
        return graph;
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

/**
 * Created by hama_du on 15/09/09.
 */
public class C {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int[] which = new int[n];
        int[][] graph = buildGraph(in, n, m);
        for (int i = 0; i < n ; i++) {
            int left = 0;
            int right = 0;
            for (int hostile : graph[i]) {
                if (which[hostile] == 1) {
                    left++;
                } else if (which[hostile] == 2) {
                    right++;
                }
            }
            which[i] = (left <= right) ? 1 : 2;
        }

        for (int i = 0; i < n ; i++) {
            out.print(which[i] == 1 ? '0' : '1');
        }
        out.println();
        out.flush();
    }

    static int[][] buildGraph(InputReader in, int n, int m) {
        int[][] edges = new int[m][];
        int[][] graph = new int[n][];
        int[] deg = new int[n];
        for (int i = 0 ; i < m ; i++) {
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            deg[a]++;
            deg[b]++;
            edges[i] = new int[]{a, b};
        }
        for (int i = 0 ; i < n ; i++) {
            graph[i] = new int[deg[i]];
        }
        for (int i = 0 ; i < m ; i++) {
            int a = edges[i][0];
            int b = edges[i][1];
            graph[a][--deg[a]] = b;
            graph[b][--deg[b]] = a;
        }
        return graph;
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}

import java.util.List;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Writer;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Arif
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    static class Node {
        int id;
        List<Node> adj = new ArrayList<Node>(0);
        int group;
        int num_edge_to_g0;
        int num_edge_to_g1;
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        Node[] nodes = new Node[n];
        for (int i = 0; i < n; ++i) {
            nodes[i] = new Node();
            nodes[i].id = i;
            nodes[i].group = -1;
            nodes[i].num_edge_to_g0 = 0;
            nodes[i].num_edge_to_g1 = 0;
        }

        int m = in.readInt();
        for (int i = 0; i < m; ++i) {
            int u = in.readInt() - 1;
            int v = in.readInt() - 1;
            nodes[u].adj.add(nodes[v]);
            nodes[v].adj.add(nodes[u]);
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            a.group = 0;

            for (int j = 0; j < a.adj.size(); ++j) {
                nodes[a.adj.get(j).id].num_edge_to_g0++;
            }
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g0 >= 2) {
                a.group = 1;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g0--;
                }
            }
        }
        for (int i = 0; i < n; ++i) {
            out.print(nodes[i].group);
        }
        out.printLine();
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        // InputMismatchException -> UnknownError
        if (numChars == -1)
            throw new UnknownError();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new UnknownError();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        } else if (c == '+') {
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.util.List;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Writer;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Arif
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    static class Node {
        int id;
        List<Node> adj = new ArrayList<Node>(0);
        int group;
        int num_edge_to_g0;
        int num_edge_to_g1;
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        Node[] nodes = new Node[n];
        for (int i = 0; i < n; ++i) {
            nodes[i] = new Node();
            nodes[i].id = i;
            nodes[i].group = -1;
            nodes[i].num_edge_to_g0 = 0;
            nodes[i].num_edge_to_g1 = 1;
        }

        int m = in.readInt();
        for (int i = 0; i < m; ++i) {
            int u = in.readInt() - 1;
            int v = in.readInt() - 1;
            nodes[u].adj.add(nodes[v]);
            nodes[v].adj.add(nodes[u]);
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g0 == 0) {
                a.group = 0;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g0++;
                }
            }
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g0 == 1) {
                a.group = 0;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g0++;
                }
            }
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.group == -1) {
                a.group = 1;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g1++;
                }
            }
        }

        boolean valid = true;
        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g1 > 3) {
                valid = false;
            }
        }

        if (!valid) {
            out.printLine("-1");
            return;
        }

        for (int i = 0; i < n; ++i) {
            out.print(nodes[i].group);
        }
        out.printLine();
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        // InputMismatchException -> UnknownError
        if (numChars == -1)
            throw new UnknownError();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new UnknownError();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        } else if (c == '+') {
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.util.List;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Writer;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Arif
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    static class Node {
        int id;
        List<Node> adj = new ArrayList<Node>(0);
        int group;
        int num_edge_to_g0;
        int num_edge_to_g1;
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        Node[] nodes = new Node[n];
        for (int i = 0; i < n; ++i) {
            nodes[i] = new Node();
            nodes[i].id = i;
            nodes[i].group = -1;
            nodes[i].num_edge_to_g0 = 0;
            nodes[i].num_edge_to_g1 = 0;
        }

        int m = in.readInt();
        for (int i = 0; i < m; ++i) {
            int u = in.readInt() - 1;
            int v = in.readInt() - 1;
            nodes[u].adj.add(nodes[v]);
            nodes[v].adj.add(nodes[u]);
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g0 == 0) {
                a.group = 0;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g0++;
                }
            }
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g0 == 1) {
                a.group = 0;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g0++;
                }
            }
        }

        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.group == -1) {
                a.group = 1;

                for (int j = 0; j < a.adj.size(); ++j) {
                    nodes[a.adj.get(j).id].num_edge_to_g1++;
                }
            }
        }

        boolean valid = true;
        for (int i = 0; i < n; ++i) {
            Node a = nodes[i];
            if (a.num_edge_to_g1 > 3) {
                valid = false;
            }
        }

        if (!valid) {
            out.printLine("-1");
            return;
        }

        for (int i = 0; i < n; ++i) {
            out.print(nodes[i].group);
        }
        out.printLine();
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        // InputMismatchException -> UnknownError
        if (numChars == -1)
            throw new UnknownError();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new UnknownError();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        } else if (c == '+') {
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

public class C {

	final int MOD = (int)1e9 + 7;
	final double eps = 1e-12;
	final int INF = (int)1e9;

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();

		Integer [][] E = new Integer [N][3]; int [] NE = new int[N];
		for (int i = 0; i < M; ++i) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			E[x][NE[x]++] = y;
			E[y][NE[y]++] = x;
		}

		int [] R = new int [N];
		Queue<Integer> Q = new LinkedList<Integer>();
		boolean [] V = new boolean [N];

		for (int i = 0; i < N; ++i) {
			Q.add(i);
			V[i] = true;
		}

		while(!Q.isEmpty()) {
			int U = Q.poll();
			int Z = 0;
			for (int j = 0; j < NE[U]; ++j)
				if (R[U] == R[E[U][j]])
					++Z;
			if (Z > 1) {
				R[U] = 1 - R[U];
				for (int j = 0; j < NE[U]; ++j) {
					int X = E[U][j];
					if (!V[X]) {
						Z = 0;
						for (int k = 0; k < NE[X]; ++k)
							if (R[E[X][k]] == R[X])
								++Z;
						if (Z > 1) {
							Q.add(X);
							V[X] = true;
						}
					}
				}
			}
		}

		char [] res = new char [N];
		for (int i = 0; i < N; ++i)
			res[i] = R[i] == 0 ? '0' : '1';

		cprint(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static MyScanner sc;

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next().toCharArray();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i = 0; i < L.length; ++i)
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error(e);
			}
		}
		private final BufferedReader r;

		MyScanner () {
			this(new BufferedReader(new InputStreamReader(System.in)));
		}

		MyScanner(BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print(Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint(Object o, Object... a) {
		printDelim("", o, a);
	}
	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit () {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build(String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = Array.getLength(o);
			for (int i = 0; i < L; ++i)
				append(b, Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>) {
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		} else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	public static void main(String[] args) {
		sc = new MyScanner ();
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static PrintWriter pw = new PrintWriter(System.out);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

	public void solve() throws IOException {
		int N = nextInt();
		int M = nextInt();
		int[] from = new int[M];
		int[] to = new int[M];
		for(int i = 0; i < M; i++){
			from[i] = nextInt()-1; to[i] = nextInt()-1;
		}
		int[][] enemies = new int[N][];
		int[] enemies_count = new int[N];
		for(int i = 0; i < M; i++){
			enemies_count[ from[i] ]++;
			enemies_count[ to[i] ]++;
		}
		for(int i = 0; i < N; i++){
			enemies[i] = new int[ enemies_count[i] ];
			enemies_count[i] = 0;
		}
		for(int i = 0; i < M; i++){
			enemies[ from[i] ][ enemies_count[from[i]]++] = to[i];
			enemies[ to[i] ][ enemies_count[to[i]]++] = from[i];
		}

		int[] type = new int[N];
		int[] same = new int[N];
		int[] incorrect = new int[N];
		int incorrect_count = 0;
		int incorrect_start = 0;
		for(int i = 0; i < N; i++){
			same[i] = enemies_count[i];
			if( same[i] >= 2){
				incorrect[ incorrect_count++ ] = i;
			}
		}
		while( incorrect_start < incorrect_count ){
			int v = incorrect[ incorrect_start++ ];
			if( same[v] < 2){
				// nothing
			}
			else{
				type[v] = 1 - type[v];
				for(int i = 0; i < enemies_count[v]; i++){
					int enemy = enemies[v][i];
					if( type[v] == type[enemy] ){
						same[enemy]++;
						same[v]++;
						if( same[enemy] == 2){
							incorrect[ incorrect_count++ ] = enemy;
						}
					}
					else{
						same[enemy]--;
						same[v]--;
					}
				}
			}
			incorrect_start++;
		}
		for(int i = 0; i < N; i++){
			out.print( type[i] );
		}
		out.println();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}