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.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

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

    void solve() {
        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 {
        int[][] G;

        public long getHash(int from, int to) {
            return from * 1000001l + to;
        }

        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int m = in.scanInt();
            int[] from = new int[m];
            int[] to = new int[m];
            HashSet<Long> set = new HashSet<>();
            for (int i = 0; i < m; i++) {
                from[i] = in.scanInt();
                to[i] = in.scanInt();
                set.add(getHash(from[i], to[i]));
                set.add(getHash(to[i], from[i]));
            }
            G = CodeHash.packGraph(from, to, n, m);

            HashSet<Integer> set1 = new HashSet<>();
            {
                boolean[] visited = new boolean[n + 1];
                for (int i : G[1]) {
                    visited[i] = true;
                }
                for (int i = 1; i <= n; i++) if (!visited[i]) set1.add(i);
            }
            HashSet<Integer> set2 = new HashSet<>();
            int nd = -1;
            {
                boolean[] visited = new boolean[n + 1];
                if (G[1].length == 0) {
                    out.println(-1);
                    return;
                }
                nd = G[1][0];
                for (int i : G[nd]) {
                    visited[i] = true;
                }
                for (int i = 1; i <= n; i++) {
                    if (!visited[i]) {
                        if (set1.contains(i)) {
                            out.println(-1);
                            return;
                        }
                        set2.add(i);
                    }
                }
            }
            HashSet<Integer> set3 = new HashSet<>();
            int nd1 = -1;
            {
                boolean[] visited = new boolean[n + 1];
                for (int i : G[nd]) {
                    if (set1.contains(i)) continue;
                    if (set2.contains(i)) throw new RuntimeException("NO");
                    nd1 = i;
                    break;
                }
                if (nd1 == -1) {
                    out.println(-1);
                    return;
                }
                for (int i : G[nd1]) {
                    visited[i] = true;
                }
                for (int i = 1; i <= n; i++) {
                    if (!visited[i]) {
                        if (set1.contains(i) || set2.contains(i)) {
                            out.println(-1);
                            return;
                        }
                        set3.add(i);
                    }
                }
            }
            long sz1 = set1.size();
            long sz2 = set2.size();
            long sz3 = set3.size();
            if (sz1 * sz2 + sz2 * sz3 + sz1 * sz3 != m) {
                out.println(-1);
                return;
            }
            for (int i : set1) {
                for (int j : set2) {
                    if (!set.contains(getHash(i, j))) {
                        out.println(-1);
                        return;
                    }
                }
            }
            for (int i : set2) {
                for (int j : set3) {
                    if (!set.contains(getHash(i, j))) {
                        out.println(-1);
                        return;
                    }
                }
            }
            for (int i : set1) {
                for (int j : set3) {
                    if (!set.contains(getHash(i, j))) {
                        out.println(-1);
                        return;
                    }
                }
            }
            if (sz1 + sz2 + sz3 != n) {
                out.println(-1);
                return;
            }
            int[] ans = new int[n + 1];
            for (int i : set1) ans[i] = 1;
            for (int i : set2) ans[i] = 2;
            for (int i : set3) ans[i] = 3;
            for (int i = 1; i <= n; i++) {
                if (ans[i] == 0) {
                    out.println(-1);
                    return;
                }
            }
            for (int i = 1; i <= n; i++) out.print(ans[i] + " ");

        }

    }

    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 integer = 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') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

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

    }

    static class CodeHash {
        public static int[][] packGraph(int[] from, int[] to, int n, int m) {
            int[][] g = new int[n + 1][];
            int p[] = new int[n + 1];
            for (int i = 0; i < m; i++) p[from[i]]++;
            for (int i = 0; i < m; i++) p[to[i]]++;
            for (int i = 0; i <= n; i++) g[i] = new int[p[i]];
            for (int i = 0; i < m; i++) {
                g[from[i]][--p[from[i]]] = to[i];
                g[to[i]][--p[to[i]]] = from[i];
            }
            return g;
        }

    }
}

