You are given a connected weighted undirected graph without any loops and multiple edges. 

Let us remind you that a graph's spanning tree is defined as an acyclic connected subgraph of the given graph that includes all of the graph's vertexes. The weight of a tree is defined as the sum of weights of the edges that the given tree contains. The minimum spanning tree (MST) of a graph is defined as the graph's spanning tree having the minimum possible weight. For any connected graph obviously exists the minimum spanning tree, but in the general case, a graph's minimum spanning tree is not unique.

Your task is to determine the following for each edge of the given graph: whether it is either included in any MST, or included at least in one MST, or not included in any MST.

Input

The first line contains two integers n and m (2 ≤ n ≤ 105, <image>) — the number of the graph's vertexes and edges, correspondingly. Then follow m lines, each of them contains three integers — the description of the graph's edges as "ai bi wi" (1 ≤ ai, bi ≤ n, 1 ≤ wi ≤ 106, ai ≠ bi), where ai and bi are the numbers of vertexes connected by the i-th edge, wi is the edge's weight. It is guaranteed that the graph is connected and doesn't contain loops or multiple edges.

Output

Print m lines — the answers for all edges. If the i-th edge is included in any MST, print "any"; if the i-th edge is included at least in one MST, print "at least one"; if the i-th edge isn't included in any MST, print "none". Print the answers for the edges in the order in which the edges are specified in the input.

Examples

Input

4 5
1 2 101
1 3 100
2 3 2
2 4 2
3 4 1


Output

none
any
at least one
at least one
any


Input

3 3
1 2 1
2 3 1
1 3 2


Output

any
any
none


Input

3 3
1 2 1
2 3 1
1 3 1


Output

at least one
at least one
at least one

Note

In the second sample the MST is unique for the given graph: it contains two first edges.

In the third sample any two edges form the MST for the given graph. That means that each edge is included at least in one MST.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int ans[N];
char text[3][32] = {"at least one", "none", "any"};
map<pair<int, int>, int> uv2id;
map<pair<int, int>, int> ruv2id;
void mark_bridge(int u, int v) {
  if (u > v) {
    swap(u, v);
  }
  ans[ruv2id[pair<int, int>(u, v)]] = 2;
}
vector<int> e[N];
int com;
int color[N];
vector<int> st;
int dfn[N], dep;
int dfs(int u, int f) {
  int ret = dfn[u] = ++dep;
  bool b = true;
  for (int& v : e[u]) {
    if (v == f && b) {
      b = false;
      continue;
    }
    if (dfn[v]) {
      ret = min(ret, dfn[v]);
    } else {
      int low = dfs(v, u);
      if (low > dfn[u]) {
        mark_bridge(u, v);
      }
      ret = min(ret, low);
    }
  }
  return ret;
}
void get_bridge(int n) {
  com = 0;
  dep = 0;
  st.clear();
  fill(dfn, dfn + n, 0);
  for (int i = 0; i < n; i++) {
    if (not dfn[i]) dfs(i, -1);
  }
}
struct Edge {
  int u;
  int v;
  int weight;
  int id;
  bool operator<(const Edge& r) const { return weight < r.weight; }
};
int f[N];
int root(int u) {
  int r = u;
  while (f[r] != r) {
    r = f[r];
  }
  while (f[u] != r) {
    int t = f[u];
    f[u] = r;
    u = r;
  }
  return r;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    f[i] = i;
  }
  vector<Edge> edge(m);
  int id = 0;
  for (auto& x : edge) {
    scanf("%d%d%d", &x.u, &x.v, &x.weight);
    x.u--;
    x.v--;
    x.id = id;
    if (x.u > x.v) {
      swap(x.u, x.v);
    }
    uv2id[pair<int, int>(x.u, x.v)] = id;
    id++;
  }
  sort(edge.begin(), edge.end());
  for (int i = 0; i < m;) {
    int j = i;
    while (j < m and edge[j].weight == edge[i].weight) {
      j++;
    }
    for (int k = i; k < j; k++) {
      int u = edge[k].u;
      int v = edge[k].v;
      if (u > v) {
        swap(u, v);
      }
      int ru = root(u);
      int rv = root(v);
      if (ru > rv) {
        swap(ru, rv);
      }
      int edge_id = uv2id[pair<int, int>(u, v)];
      if (ru == rv) {
        ans[edge_id] = 1;
      } else {
        e[ru].push_back(rv);
        e[rv].push_back(ru);
        ruv2id[make_pair(ru, rv)] = edge_id;
      }
    }
    com = 0;
    dep = 0;
    for (int k = i; k < j; k++) {
      int u = root(edge[k].u);
      int v = root(edge[k].v);
      if (not dfn[u]) dfs(u, -1);
      if (not dfn[v]) dfs(v, -1);
    }
    for (int k = i; k < j; k++) {
      int u = root(edge[k].u);
      int v = root(edge[k].v);
      if (u != v) {
        f[u] = v;
      }
      e[u].clear();
      e[v].clear();
      dfn[u] = 0;
      dfn[v] = 0;
    }
    i = j;
  }
  for (int i = 0; i < m; i++) {
    printf("%s\n", text[ans[i]]);
  }
  return 0;
}
