You have a simple undirected graph consisting of n vertices and m edges. The graph doesn't contain self-loops, there is at most one edge between a pair of vertices. The given graph can be disconnected.

Let's make a definition.

Let v_1 and v_2 be two some nonempty subsets of vertices that do not intersect. Let f(v_{1}, v_{2}) be true if and only if all the conditions are satisfied:

  1. There are no edges with both endpoints in vertex set v_1. 
  2. There are no edges with both endpoints in vertex set v_2. 
  3. For every two vertices x and y such that x is in v_1 and y is in v_2, there is an edge between x and y. 



Create three vertex sets (v_{1}, v_{2}, v_{3}) which satisfy the conditions below;

  1. All vertex sets should not be empty. 
  2. Each vertex should be assigned to only one vertex set. 
  3. f(v_{1}, v_{2}), f(v_{2}, v_{3}), f(v_{3}, v_{1}) are all true. 



Is it possible to create such three vertex sets? If it's possible, print matching vertex set for each vertex.

Input

The first line contains two integers n and m (3 ≤ n ≤ 10^{5}, 0 ≤ m ≤ min(3 ⋅ 10^{5}, (n(n-1))/(2))) — the number of vertices and edges in the graph.

The i-th of the next m lines contains two integers a_{i} and b_{i} (1 ≤ a_{i} < b_{i} ≤ n) — it means there is an edge between a_{i} and b_{i}. The graph doesn't contain self-loops, there is at most one edge between a pair of vertices. The given graph can be disconnected.

Output

If the answer exists, print n integers. i-th integer means the vertex set number (from 1 to 3) of i-th vertex. Otherwise, print -1.

If there are multiple answers, print any.

Examples

Input


6 11
1 2
1 3
1 4
1 5
1 6
2 4
2 5
2 6
3 4
3 5
3 6


Output


1 2 2 3 3 3 

Input


4 6
1 2
1 3
1 4
2 3
2 4
3 4


Output


-1

Note

In the first example, if v_{1} = \{ 1 \}, v_{2} = \{ 2, 3 \}, and v_{3} = \{ 4, 5, 6 \} then vertex sets will satisfy all conditions. But you can assign vertices to vertex sets in a different way; Other answers like "2 3 3 1 1 1" will be accepted as well.

<image>

In the second example, it's impossible to make such vertex sets.
import java.io.*;
import java.util.*;

public class E implements Runnable {
	boolean judge = false;
	FastReader scn;
	PrintWriter out;
	String INPUT = "3 2 1 2 2 3";

	int inf = 5000_000;

	void solve() {
		int n = scn.nextInt(), m = scn.nextInt();
		int[] from = new int[m], to = new int[m];
		DisJointSet dj = new DisJointSet(n);
		for (int i = 0; i < m; i++) {
			from[i] = scn.nextInt() - 1;
			to[i] = scn.nextInt() - 1;
			dj.union(from[i], to[i]);
		}
		
		if(dj.size != 1) {
			out.println(-1);
			return;
		}

		int[][] g = packU(n, from, to);

		long[] arr = new long[n], ans = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = i;
		}

		int[][] ret = f(g, arr);

		if (ret[0].length == 0 || ret[1].length == 0) {
			out.println(-1);
			return;
		}

		for (int i = 0; i < n; i++) {
			arr[i] -= inf;
		}

		boolean found = false;

		{
			long[] copy = Arrays.copyOf(arr, arr.length);
			for (int i = 0; i < ret[0].length; i++) {
				copy[ret[0][i]] += inf;
			}

			for (int i = 0; i < ret[1].length; i++) {
				ans[ret[1][i]] = 1;
			}

			int[][] rv = f(g, copy);
			if (rv[0].length != 0 && rv[1].length != 0) {
				for (int i = 0; i < rv[0].length; i++) {
					ans[rv[0][i]] = 2;
				}
				for (int i = 0; i < rv[1].length; i++) {
					ans[rv[1][i]] = 3;
				}

				found = true;
			}
		}

		if (!found) {
			Arrays.fill(ans, 0);
			for (int i = 0; i < ret[1].length; i++) {
				arr[ret[1][i]] += inf;
			}

			for (int i = 0; i < ret[0].length; i++) {
				ans[ret[0][i]] = 1;
			}

			int[][] rv = f(g, arr);
			if (rv[0].length != 0 && rv[1].length != 0) {
				for (int i = 0; i < rv[0].length; i++) {
					ans[rv[0][i]] = 2;
				}
				for (int i = 0; i < rv[1].length; i++) {
					ans[rv[1][i]] = 3;
				}

				found = true;
			}
		}

		if (!found) {
			out.println(-1);
			return;
		}
		
		for(int i = 0; i < m; i++) {
			if(ans[from[i]] == ans[to[i]]) {
				out.println(-1);
				return;
			}
		}
		
		long x = 0, y = 0, z = 0;
		for(int i = 0; i < n; i++) {
			if(ans[i] == 1) {
				x++;
			} else if(ans[i] == 2) {
				y++;
			} else if(ans[i] == 3) {
				z++;
			}
		}
		
		if(x + y + z != n || x * (y + z) + y * z != m) {
			out.println(-1);
			return;
		}
		
		for(long a : ans) {
			out.print(a + " ");
		}
		out.println();
	}
	
	

	int[][] f(int[][] g, long[] arr) {
		int n = g.length;

		int[] set = new int[n];
		HashSet<Integer> need = new HashSet<>();
		for (int i = 0; i < n; i++) {
			if (arr[i] >= 0) {
				set[i] = (int)arr[i];
				need.add((int)arr[i]);
			} else {
				set[i] = -1;
			}
		}

		for (int i = 0; i < n; i++) {
			if (set[i] < 0) {
				continue;
			}
			int u = set[i];
			for (int v : g[u]) {
				set[v] = -inf;
			}
		}

		int x = 0, y = 0;
		for (int i = 0; i < n; i++) {
			if (need.contains((int)arr[i])) {
				if (set[i] < 0) {
					y++;
				} else {
					x++;
				}
			}
		}

		int[] a = new int[x], b = new int[y];
		for (int i = 0; i < n; i++) {
			if (need.contains((int)arr[i])) {
				if (set[i] < 0) {
					b[--y] = (int)arr[i];
				} else {
					a[--x] = (int)arr[i];
				}
			}
		}

		return new int[][] { a, b };
	}
	
	class DisJointSet {
		int[] table, rank, count;
		int size;

		DisJointSet(int size) {
			this.table = new int[size];
			this.rank = new int[size];
			this.count = new int[size];
			this.size = size;
			for (int i = 0; i < size; i++) {
				this.table[i] = i;
				this.rank[i] = 1;
				this.count[i] = 1;
			}
		}

		boolean isSame(int x, int y) {
			return root(x) == root(y);
		}

		int root(int node) {
			if (table[node] == node) {
				return node;
			} else {
				return table[node] = root(table[node]);
			}
		}

		void union(int x, int y) {
			x = root(x);
			y = root(y);
			if (x != y)
				this.size--;
			if (rank[x] < rank[y]) {
				table[x] = y;
				count[y] += count[x];
			} else if (rank[x] > rank[y]) {
				table[y] = x;
				count[x] += count[y];
			} else if (x != y) {
				table[y] = x;
				count[x] += count[y];
				rank[x]++;
			}
		}
	}

	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;
	}

	public void run() {
		long time = System.currentTimeMillis();
		boolean oj = System.getProperty("ONLINE_JUDGE") != null || judge;
		out = new PrintWriter(System.out);
		scn = new FastReader(oj);
		solve();
		out.flush();
		if (!oj) {
			System.out.println(Arrays.deepToString(new Object[] { System.currentTimeMillis() - time + " ms" }));
		}
	}

	public static void main(String[] args) {
		new Thread(null, new E(), "Main", 1 << 26).start();
	}

	class FastReader {
		InputStream is;

		public FastReader(boolean onlineJudge) {
			is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		}

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

		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++];
		}

		boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b))
				;
			return b;
		}

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

		char nextChar() {
			return (char) skip();
		}

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

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

		char[] next(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);
		}

		int nextInt() {
			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();
			}
		}

		long nextLong() {
			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();
			}
		}

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

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

		long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		int[][] next2DInt(int n, int m) {
			int[][] arr = new int[n][];
			for (int i = 0; i < n; i++) {
				arr[i] = nextIntArray(m);
			}
			return arr;
		}

		long[][] next2DLong(int n, int m) {
			long[][] arr = new long[n][];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLongArray(m);
			}
			return arr;
		}

		int[] shuffle(int[] arr) {
			Random r = new Random();
			for (int i = 1, j; i < arr.length; i++) {
				j = r.nextInt(i);
				int c = arr[i];
				arr[i] = arr[j];
				arr[j] = c;
			}
			return arr;
		}

		long[] shuffle(long[] arr) {
			Random r = new Random();
			for (int i = 1, j; i < arr.length; i++) {
				j = r.nextInt(i);
				long c = arr[i];
				arr[i] = arr[j];
				arr[j] = c;
			}
			return arr;
		}

		int[] uniq(int[] arr) {
			arr = scn.shuffle(arr);
			Arrays.sort(arr);
			int[] rv = new int[arr.length];
			int pos = 0;
			rv[pos++] = arr[0];
			for (int i = 1; i < arr.length; i++) {
				if (arr[i] != arr[i - 1]) {
					rv[pos++] = arr[i];
				}
			}
			return Arrays.copyOf(rv, pos);
		}

		long[] uniq(long[] arr) {
			arr = scn.shuffle(arr);
			Arrays.sort(arr);
			long[] rv = new long[arr.length];
			int pos = 0;
			rv[pos++] = arr[0];
			for (int i = 1; i < arr.length; i++) {
				if (arr[i] != arr[i - 1]) {
					rv[pos++] = arr[i];
				}
			}
			return Arrays.copyOf(rv, pos);
		}

		int[] reverse(int[] arr) {
			int l = 0, r = arr.length - 1;
			while (l < r) {
				arr[l] = arr[l] ^ arr[r];
				arr[r] = arr[l] ^ arr[r];
				arr[l] = arr[l] ^ arr[r];
				l++;
				r--;
			}
			return arr;
		}

		long[] reverse(long[] arr) {
			int l = 0, r = arr.length - 1;
			while (l < r) {
				arr[l] = arr[l] ^ arr[r];
				arr[r] = arr[l] ^ arr[r];
				arr[l] = arr[l] ^ arr[r];
				l++;
				r--;
			}
			return arr;
		}

		int[] compress(int[] arr) {
			int n = arr.length;
			int[] rv = Arrays.copyOf(arr, n);
			rv = uniq(rv);
			for (int i = 0; i < n; i++) {
				arr[i] = Arrays.binarySearch(rv, arr[i]);
			}
			return arr;
		}

		long[] compress(long[] arr) {
			int n = arr.length;
			long[] rv = Arrays.copyOf(arr, n);
			rv = uniq(rv);
			for (int i = 0; i < n; i++) {
				arr[i] = Arrays.binarySearch(rv, arr[i]);
			}
			return arr;
		}
	}
}