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.
#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void read(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void readc(char &x) {
  char c;
  while (((c = getchar()) == ' ') || c == '\n')
    ;
  x = c;
}
inline void writes(string s) { puts(s.c_str()); }
inline void writeln() { writes(""); }
inline void writei(int x) {
  if (x < 0) {
    putchar('-');
    x = abs(x);
  }
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
inline void writell(long long x) {
  if (x < 0) {
    putchar('-');
    x = abs(x);
  }
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
long long n, m, i, j, fa[300005], px[300005], py[300005], cnt1, cnt2, cnt3,
    col1, col2, col3;
vector<long long> ban[300005];
map<long long, long long> cnt;
long long fnd(long long x) {
  if (fa[x] == x) return x;
  return fa[x] = fnd(fa[x]);
}
int main() {
  read(n);
  read(m);
  for (((i)) = (1); ((i)) <= ((m)); ((i))++) {
    read(px[i]);
    read(py[i]);
    ban[px[i]].push_back(py[i]);
    ban[py[i]].push_back(px[i]);
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    fa[i] = i;
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    sort(ban[i].begin(), ban[i].end());
    for (j = 1; j <= n; j++) {
      if (j <= ban[i].size() && ban[i][j - 1] == j) continue;
      break;
    }
    if (j <= n) fa[fnd(j)] = fnd(i);
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    cnt[fnd(i)]++;
  }
  if (cnt.size() != 3) {
    puts("-1");
    return 0;
  }
  for (__typeof((cnt).begin()) it = (cnt).begin(); it != (cnt).end(); it++) {
    if (cnt2)
      cnt3 = it->second;
    else if (cnt1)
      cnt2 = it->second;
    else
      cnt1 = it->second;
    if (col2)
      col3 = it->first;
    else if (col1)
      col2 = it->first;
    else
      col1 = it->first;
  }
  if (m != cnt1 * cnt2 + cnt2 * cnt3 + cnt3 * cnt1) {
    puts("-1");
    return 0;
  }
  for (((i)) = (1); ((i)) <= ((m)); ((i))++) {
    if (fnd(px[i]) == fnd(py[i])) {
      puts("-1");
      return 0;
    }
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    if (fnd(i) == col1) printf("1 ");
    if (fnd(i) == col2) printf("2 ");
    if (fnd(i) == col3) printf("3 ");
  }
  return 0;
}
