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;
vector<pair<int, int> > a[100010], temp;
vector<int> tk;
int vt[100010], vs[100010], ver[100010], t, n, m, x, y, cn, low[100010],
    num[100010], per[100010], dd[100010], ff[100010], check[100010];
struct ty {
  int u, v, d;
} c[100010];
bool cmp(int i, int j) { return c[i].d < c[j].d; }
void dfs(int u) {
  vs[u] = t;
  ++cn;
  low[u] = num[u] = cn;
  for (int i = 0; i < a[u].size(); i++) {
    if (vs[a[u][i].first] != t || check[a[u][i].second] == 0) {
      check[a[u][i].second] = 1;
      if (vs[a[u][i].first] != t) {
        per[a[u][i].first] = u;
        dfs(a[u][i].first);
        low[u] = min(low[u], low[a[u][i].first]);
        if (low[a[u][i].first] == num[a[u][i].first]) dd[a[u][i].second] = 1;
      } else
        low[u] = min(low[u], num[a[u][i].first]);
    }
  }
}
int goc(int x) {
  if (ff[x] == 0)
    return x;
  else
    return ff[x] = goc(ff[x]);
}
void link(int x, int y) {
  x = goc(x);
  y = goc(y);
  if (x != y) ff[x] = y;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%d", &c[i].u, &c[i].v, &c[i].d);
  }
  for (int i = 1; i <= m; i++) vt[i] = i;
  sort(vt + 1, vt + m + 1, cmp);
  t = 1;
  for (int i = 1; i <= m; i++) {
    x = goc(c[vt[i]].u);
    y = goc(c[vt[i]].v);
    if (x != y) {
      if (ver[x] != t) a[x].clear(), ver[x] = t, tk.push_back(x);
      if (ver[y] != t) a[y].clear(), ver[y] = t, tk.push_back(y);
      a[x].push_back(make_pair(y, vt[i]));
      a[y].push_back(make_pair(x, vt[i]));
      temp.push_back(make_pair(x, y));
    } else
      dd[vt[i]] = -1;
    if (i == m || c[vt[i]].d != c[vt[i + 1]].d) {
      for (int j = 0; j < tk.size(); j++)
        if (vs[tk[j]] != t) dfs(tk[j]);
      for (int j = 0; j < temp.size(); j++)
        link(goc(temp[j].first), goc(temp[j].second));
      t++;
      temp.clear();
      tk.clear();
    }
  }
  for (int i = 1; i <= m; i++)
    if (dd[i] == -1)
      printf("none\n");
    else if (dd[i] == 0)
      printf("at least one\n");
    else
      printf("any\n");
  return 0;
}
