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 sys

n, m = [int(x) for x in input().split()]

d = {i: [] for i in range(n)}

for _ in range(m):
  ai, bi = [int(x) for x in input().split()]
  d[ai-1].append(bi-1)
  d[bi-1].append(ai-1)

# All vertices WITHOUT an edge from 0 will be component A:
#A = set(range(n)) - set(d[0])
which_set = [None for _ in range(n)]

SET_B_OR_C = 0
SET_A = 1
SET_B = 2
SET_C = 3
for x in d[0]: which_set[x] = SET_B_OR_C
for x in range(n):
  if which_set[x] is None:
    which_set[x] = SET_A

# Everything must have at least one edge:
if not d[0]:
  #print("one edge")
  print(-1)
  sys.exit(0)

# Let B be the component of d[0][0]:
#B = set(range(n)) - set(d[d[0][0]])
for x in d[d[0][0]]:
  if which_set[x] == SET_B_OR_C:
    which_set[x] = SET_B
  elif which_set[x] == SET_A: continue # x should have edges to all of A
  else:
    # print(d[d[0][0]])
    # print(which_set)
    # print(x)
    # print(d[0])
    # print(d[0][0])
    # print("B or C expected")
    print(-1)
    sys.exit(0)

# Let C be the rest:
#C = set(range(n)) - A - B
for x in range(n):
  if which_set[x] == SET_B_OR_C:
    which_set[x] = SET_C
  # else:
  #   print("B or C expected (2)")
  #   print(-1)
  #   sys.exit(0)

# Check if it worked:
# (0) sets must be non-empty:
# if not A or not B or not C:
#   #print("empty set")
#   print(-1)
#   sys.exit(0)
num_A, num_B, num_C = 0, 0, 0
for x in which_set:
  if x == SET_A: num_A += 1
  if x == SET_B: num_B += 1
  if x == SET_C: num_C += 1
if num_A == 0 or num_B == 0 or num_C == 0:
  #print("empty set")
  print(-1)
  sys.exit(0)

# (1) the 3 sets must be disjoint
# if A & B or B & C or A & C:
#   #print(A, B, C, sep="\n")
#   #print("not disjoint")
#   print(-1)
#   sys.exit(0)
# We detected disjointess earlier

# (2) the union of the sets must be the whole thing (probably follows for def of C)
# if set(range(n)) != A | B | C:
#   #print("not whole graph")
#   print(-1)
#   sys.exit(0)
# This is also handled earlier

# No edge may go between 2 nodes in the same set:
# which_set = [None for _ in range(n)]
# for a in A: which_set[a] = 1
# for b in B: which_set[b] = 2
# for c in C: which_set[c] = 3

def same_set(x, y):
  return which_set[x] == which_set[y]

for x in d:
  for y in d[x]:
    if same_set(x, y):
      #print("edges inside set")
      print(-1)
      sys.exit(0)

# There must be an edge between all x, y such that x in one set and y in another:
expected_num_edges = ((num_A * num_B # (len(A) * len(B) # all edges between A-B
                      + num_B * num_C # + len(B) * len(C) # B -- C
                      + num_A * num_C) # + len(A) * len(C)) # A -- C
                      * 2) # because each edge is counted twice
if sum(len(d[x]) for x in d) != expected_num_edges:
  #print("wrong # edges")
  print(-1)
  sys.exit(0)

print(*which_set)