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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Arrays;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

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

    static class DCompleteTripartite {
        boolean[] visited;
        HashSet<Integer>[] g;

        void dfs(int node) {
            visited[node] = true;
            for (int k : g[node]) {
                if (!visited[k]) dfs(k);
            }
        }

        public void solve(int testNumber, ScanReader in, PrintWriter out) {

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

            g = new HashSet[n + 1];
            for (int i = 1; i <= n; i++) g[i] = new HashSet<>();
            int ee[][] = new int[m][2];

            visited = new boolean[n + 1];


            for (int i = 0; i < m; i++) {
                int a = in.scanInt();
                int b = in.scanInt();
                g[a].add(b);
                g[b].add(a);
                ee[i] = new int[]{a, b};
            }

            dfs(1);
            for (int i = 1; i <= n; i++) {
                if (!visited[i]) {
                    out.println(-1);
                    return;
                }
            }


            int ans[] = new int[n + 1];


            Arrays.fill(ans, -1);


            for (int k : g[1]) ans[k] = 4;
            for (int i = 1; i <= n; i++) if (ans[i] == -1) ans[i] = 1;
            int index = -1;
            for (int i = 1; i <= n; i++) {
                if (ans[i] == 4) {
                    ans[i] = 2;
                    index = i;
                    break;
                }
            }

            if (index == -1) {
                out.println(-1);
                return;
            }

            for (int k : g[index]) if (ans[k] == 4) ans[k] = 3;
            for (int i = 1; i <= n; i++) if (ans[i] == 4) ans[i] = 2;


            boolean check = true;
            for (int i = 1; i <= n; i++) {
                if (ans[i] == -1) check = false;
                if (ans[i] == 4) check = false;


                if (ans[i] == 1 || ans[i] == 2 || ans[i] == 3) {

                } else {
                    check = false;
                }
            }


            long o1 = 0;
            long o2 = 0;
            long o3 = 0;

            for (int i = 1; i <= n; i++) {
                if (ans[i] == 1) o1++;
                else if (ans[i] == 2) o2++;
                else if (ans[i] == 3) o3++;
            }

            long c23 = 0;
            long c12 = 0;
            long c13 = 0;
            if (o1 == 0 || o2 == 0 || o3 == 0) check = false;
            for (int i = 0; i < m; i++) {
                if (ans[ee[i][0]] == ans[ee[i][1]]) check = false;

                if (ans[ee[i][0]] == 2 && ans[ee[i][1]] == 3) c23++;
                if (ans[ee[i][0]] == 3 && ans[ee[i][1]] == 2) c23++;

                if (ans[ee[i][0]] == 1 && ans[ee[i][1]] == 2) c12++;
                if (ans[ee[i][0]] == 2 && ans[ee[i][1]] == 1) c12++;

                if (ans[ee[i][0]] == 1 && ans[ee[i][1]] == 3) c13++;
                if (ans[ee[i][0]] == 3 && ans[ee[i][1]] == 1) c13++;

            }


            if (c23 == (o2 * o3)) {

            } else {
                check = false;
            }


            if (c13 == (o1 * o3)) {

            } else {
                check = false;
            }


            if (c12 == (o1 * o2)) {

            } else {
                check = false;
            }


            if (check) {
                for (int i = 1; i <= n; i++) {
                    out.print(ans[i] + " ");
                }
            } else {
                out.println(-1);
            }


        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int INDEX;
        private BufferedInputStream in;
        private int TOTAL;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (INDEX >= TOTAL) {
                INDEX = 0;
                try {
                    TOTAL = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (TOTAL <= 0) return -1;
            }
            return buf[INDEX++];
        }

        public int scanInt() {
            int I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}

