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 Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            int m=input.nextInt();
            HashSet<Integer> adj[]=new HashSet[n+1];
            for(int i=1;i<=n;i++)
            {
                adj[i]=new HashSet<>();
            }
            for(int i=0;i<m;i++)
            {
                int u=input.nextInt();
                int v=input.nextInt();
                adj[u].add(v);
                adj[v].add(u);
            }
            int visit[]=new int[n+1];
            Pair p1=fun(visit,adj,n);
            Pair p2=fun(visit,adj,n);
            Pair p3=fun(visit,adj,n);
            int flag=0;
            for(int i=1;i<=n;i++)
            {
                if(visit[i]==0)
                {
                    flag=1;
                    break;
                }
            }
            if(p1.list.size()+p1.set.size()!=n)
            {
                flag=1;
            }
            if(p2.list.size()+p2.set.size()!=n)
            {
                flag=1;
            }
            if(p3.list.size()+p3.set.size()!=n)
            {
                flag=1;
            }
            if(flag==1)
            {
                out.println(-1);
            }
            else
            {
                int arr[]=new int[n+1];
                for(int i=0;i<p1.list.size();i++)
                {
                    arr[p1.list.get(i)]=1;
                }
                for(int i=0;i<p2.list.size();i++)
                {
                    arr[p2.list.get(i)]=2;
                }
                for(int i=0;i<p3.list.size();i++)
                {
                    arr[p3.list.get(i)]=3;
                }
                for(int i=1;i<=n;i++)
                {
                    out.print(arr[i]+" ");
                }
                out.println();
            }
        }
        out.close();
    }
    public static Pair fun(int visit[],HashSet<Integer> adj[],int n)
    {
        HashSet<Integer> set1=new HashSet<>();
        int s=0;
        for(int i=1;i<=n;i++)
        {
            if(visit[i]==0)
            {
                s=i;
                set1.addAll(adj[i]);
                break;
            }
        }
        ArrayList<Integer> list1=new ArrayList<>();
        list1.add(s);
        visit[s]=1;
        for(int i=1;i<=n;i++)
        {
            if(adj[i].size()==set1.size() && visit[i]==0)
            {
                int f=0;
                Iterator it=set1.iterator();
                while(it.hasNext())
                {
                    int u=(int)it.next();
                    if(!adj[i].contains(u))
                    {
                        f=1;
                        break;
                    }
                }
                if(f==0)
                {
                    list1.add(i);
                    visit[i]=1;
                }
            }
        }
        Pair p=new Pair();
        p.set.addAll(set1);
        p.list.addAll(list1);
        return p;
    }
    static class Pair
    {
        HashSet<Integer> set=new HashSet<>();
        ArrayList<Integer> list=new ArrayList<>();
    }
    public static void mergeSort(ArrayList<Integer> a,int p,int r)
    {
        if(p<r)
        {
            int q=(p+r)/2;
            mergeSort(a,p,q);
            mergeSort(a,q+1,r);
            merge(a,p,q,r);
        }
    }
    public static void merge(ArrayList<Integer> a,int p,int q,int r)
    {
        int n1=q-p+2;
        int L[]=new int[n1];
        int n2=r-q+1;
        int R[]=new int[n2];
        for(int i=p;i<=q;i++)
        {
            L[i-p]=a.get(i);
        }
        L[n1-1]=Integer.MAX_VALUE;
        for(int i=q+1;i<=r;i++)
        {
            R[i-q-1]=a.get(i);
        }
        R[n2-1]=Integer.MAX_VALUE;
        int x=0,y=0;
        for(int i=p;i<=r;i++)
        {
            if(L[x]<=R[y])
            {
                a.set(i,L[x]);
                x++;
            }
            else
            {
                a.set(i,R[y]);
                y++;
            }
        }
    }
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt()
        {
            return Integer.parseInt(next());
        }
        long nextLong()
        {
            return Long.parseLong(next());
        }
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
        String nextLine()
        {
            String str="";
            try
            {
                str=br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}