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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("avx")
using namespace std;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcountll(s);
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
inline int minimize(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int maximize(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
mt19937 RNG(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int myrand() { return abs((int)RNG()); }
const int MAXN = 1e5 + 100;
const int MOD = 1e9 + 7;
const long long MAXV = 1e9;
const double eps = 1e-12;
const int INF = 2e9 + 100;
const long long INF_LL = 1e16;
inline string toStr(long long x) {
  string tmp = "";
  do tmp = char(x % 10 + '0') + tmp;
  while (x /= 10);
  return tmp;
}
inline long long toInt(string s) {
  long long res = 0;
  for (auto x : s) res = res * 10 + x - '0';
  return res;
}
inline string toBinStr(long long x) {
  string res = "";
  do res = (x % 2 ? "1" : "0") + res;
  while (x >>= 1LL);
  return res;
}
long long rnd(int k) {
  if (!k) return myrand() % MAXV + 1;
  long long t = myrand() % MAXV + 1;
  return (myrand() % t) + (MAXV - t);
}
long long random_gen(int sign) {
  long long x = rnd(myrand() % 2);
  long long s = myrand() % 2;
  s = !s ? 1 : -1;
  return sign == 1 ? x : sign == -1 ? -x : s * x;
}
int n;
vector<int> g[MAXN];
vector<std::pair<int, int> > edge;
int color[MAXN];
int deg[MAXN];
void dfs(int u) {
  color[u] = 1;
  for (auto v : g[u])
    if (!color[v]) dfs(v);
}
bool retest() {
  long long a = 0, b = 0, c = 0;
  for (int u = (1), _b = (n); u <= _b; u++)
    if (color[u] == 1)
      ++a;
    else if (color[u] == 2)
      ++b;
    else if (color[u] == 3)
      ++c;
  if (!a || !b || !c) return false;
  if (a + b + c != n) return false;
  if (a * (b + c) + b * c != edge.size()) return false;
  for (auto E : edge) {
    int u = E.first, v = E.second;
    if (color[u] == color[v]) return false;
  }
  return true;
}
int Ares_KN() {
  int m;
  cin >> n >> m;
  while (m--) {
    int u, v;
    cin >> u >> v;
    edge.emplace_back(u, v);
    g[u].push_back(v), g[v].push_back(u);
    ++deg[u], ++deg[v];
  }
  for (int u = (1), _b = (n); u <= _b; u++)
    if (deg[u] < 2) return !puts("-1");
  int component = 0;
  for (int u = (1), _b = (n); u <= _b; u++)
    if (!color[u]) {
      dfs(u);
      ++component;
    }
  if (component > 1) return !puts("-1");
  for (int u = (1), _b = (n); u <= _b; u++) sort(g[u].begin(), g[u].end());
  memset(color, 0, sizeof(color));
  color[1] = 1;
  for (int u = (2), _b = (n); u <= _b; u++)
    if (!binary_search(g[1].begin(), g[1].end(), u)) color[u] = 1;
  for (int u = (2), _b = (n); u <= _b; u++)
    if (!color[u]) {
      color[u] = 2;
      for (int v = (1), _b = (n); v <= _b; v++)
        if (!color[v])
          if (!binary_search(g[u].begin(), g[u].end(), v)) color[v] = 2;
      break;
    }
  for (int u = (2), _b = (n); u <= _b; u++)
    if (!color[u]) {
      color[u] = 3;
      for (int v = (1), _b = (n); v <= _b; v++)
        if (!color[v])
          if (!binary_search(g[u].begin(), g[u].end(), v)) color[v] = 3;
      break;
    }
  bool good = retest();
  if (good)
    for (int u = (1), _b = (n); u <= _b; u++) printf("%d ", color[u]);
  else
    puts("-1");
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  Ares_KN();
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
