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 NODE = 300000 + 5, EDGE = 300000 + 5, BIEDGE = EDGE * 2;
int n, m;
int hd[NODE], to[BIEDGE], nxt[BIEDGE];
inline void addedge(int idx, int a, int b) {
  nxt[idx] = hd[a];
  hd[a] = idx;
  to[idx] = b;
}
struct Edge {
  int id;
  int a, b, len;
  inline bool operator<(const Edge &B) const { return len < B.len; }
};
Edge edge[EDGE];
int ans[EDGE];
const char info[3][50] = {"none", "at least one", "any"};
int us_fa[NODE], us_cnt[NODE];
inline void us_init() {
  for (int i = 1; i <= n; ++i) us_fa[i] = i, us_cnt[i] = 1;
}
inline int us_find(int a) {
  int f = a;
  while (us_fa[f] != f) f = us_fa[f];
  while (us_fa[a] != f) {
    int t = us_fa[a];
    us_fa[a] = f;
    a = t;
  }
  return f;
}
inline void us_union(int a, int b) {
  a = us_find(a), b = us_find(b);
  if (a == b) return;
  if (us_cnt[a] > us_cnt[b]) swap(a, b);
  us_fa[a] = b;
  us_cnt[b] += us_cnt[a];
}
int tj_dfn[NODE], tj_low[NODE], tj_tim;
void tarjan(int u, int feid) {
  tj_dfn[u] = tj_low[u] = ++tj_tim;
  for (int e = hd[u]; e; e = nxt[e]) {
    if ((e >> 1) == feid) continue;
    int v = to[e];
    if (!tj_dfn[v]) {
      tarjan(v, e >> 1);
      tj_low[u] = min(tj_low[u], tj_low[v]);
    } else
      tj_low[u] = min(tj_low[u], tj_dfn[v]);
  }
  if (feid && tj_dfn[u] == tj_low[u]) {
    ans[edge[feid].id] = 2;
  }
}
set<int> m_t_set;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    edge[i].id = i;
    scanf("%d%d%d", &edge[i].a, &edge[i].b, &edge[i].len);
  }
  sort(edge + 1, edge + m + 1);
  us_init();
  for (int r = 1; r <= m;) {
    int l = r;
    while (r <= m && edge[r].len == edge[l].len) ++r;
    m_t_set.clear();
    for (int it = l; it < r; ++it) {
      int x = us_find(edge[it].a), y = us_find(edge[it].b);
      if (x == y) {
        ans[edge[it].id] = 0;
      } else {
        ans[edge[it].id] = 1;
        addedge(it << 1, x, y);
        addedge(it << 1 | 1, y, x);
        m_t_set.insert(x), m_t_set.insert(y);
      }
    }
    tj_tim = 0;
    for (set<int>::iterator it = m_t_set.begin(); it != m_t_set.end(); ++it) {
      tj_dfn[*it] = tj_low[*it] = 0;
      hd[*it] = 0;
    }
    for (int it = l; it < r; ++it) {
      int x = us_find(edge[it].a), y = us_find(edge[it].b);
      if (x != y) {
        addedge(it << 1, x, y);
        addedge(it << 1 | 1, y, x);
      }
    }
    for (set<int>::iterator it = m_t_set.begin(); it != m_t_set.end(); ++it) {
      if (!tj_dfn[*it]) tarjan(*it, 0);
    }
    for (int it = l; it < r; ++it) {
      int x = us_find(edge[it].a), y = us_find(edge[it].b);
      if (x != y) us_union(x, y);
    }
  }
  for (int i = 1; i <= m; ++i) puts(info[ans[i]]);
  return 0;
}
