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;
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
int be(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) {
      b--;
      ans *= a;
      ans %= 1000000007;
    }
    b /= 2;
    a *= a;
    a %= 1000000007;
  }
  return ans;
}
void fi(int &num) {
  bool neg = false;
  num = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') break;
    ch = getchar();
  }
  if (ch == '-') {
    neg = true;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    num = num * 10 + ch - '0';
    ch = getchar();
  }
  if (neg) num = -num;
}
int add(int a, int b) {
  int sum = a % 1000000007;
  sum += (b % 1000000007);
  sum %= 1000000007;
  if (sum < 0) sum += 1000000007;
  return sum;
}
int mul(int a, int b) {
  int ans = a % 1000000007;
  ans *= (b % 1000000007);
  ans %= 1000000007;
  return ans;
}
int sub(int a, int b) {
  int sum = a % 1000000007;
  sum -= (b % 1000000007);
  sum %= 1000000007;
  if (sum < 0) sum += 1000000007;
  return sum;
}
int maximum(int a, int b) {
  if (a > b) return a;
  return b;
}
int minimum(int a, int b) {
  if (a < b) return a;
  return b;
}
set<int> adj[100001];
set<pair<long long, long long> > hashadj;
int n, m;
long long base1 = 966617;
long long base2 = 965171;
long long mod1 = 1000000009;
long long mod2 = 1000000007;
long long base1p[100001], base2p[100001];
map<int, pair<long long, long long> > mapi;
map<pair<long long, long long>, int> mappl;
signed main() {
  base1p[0] = 1;
  base2p[0] = 1;
  for (int i = 1; i <= 100000; i++) {
    base1p[i] = (base1 * base1p[i - 1]) % mod1;
    base2p[i] = (base2 * base2p[i - 1]) % mod2;
  }
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a].insert(b);
    adj[b].insert(a);
  }
  for (int i = 1; i <= n; i++) {
    set<int>::iterator itr = adj[i].begin();
    pair<long long, long long> temphash;
    long long hash1 = 0, hash2 = 0;
    long long num = 0;
    while (itr != adj[i].end()) {
      int nex = *itr;
      hash1 += base1p[num] * nex;
      hash1 %= mod1;
      hash2 += base2p[num] * nex;
      hash2 %= mod2;
      num++;
      itr++;
    }
    if (hash1 > hash2) swap(hash1, hash2);
    hashadj.insert(make_pair(hash1, hash2));
    mapi[i] = make_pair(hash1, hash2);
  }
  if (hashadj.size() != 3)
    printf("-1\n");
  else {
    int counter = 1;
    while (!hashadj.empty()) {
      pair<long long, long long> temp = *(hashadj.begin());
      mappl[temp] = counter;
      counter++;
      hashadj.erase(temp);
    }
    for (int i = 1; i <= n; i++) printf("%d ", mappl[mapi[i]]);
  }
  return 0;
}
