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;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
struct graph {
  int u, v, w, pos;
  graph() {}
  graph(int a, int b, int c, int d) { u = a, v = b, w = c, pos = d; }
  bool operator<(const graph& p) const { return w < p.w; }
} arr[100000 + 7];
int n, m, tym, ans[100000 + 7], prnt[100000 + 7];
int low[100000 + 7];
int dis[100000 + 7];
bool visit[100000 + 7];
vector<int> edges[100000 + 7];
vector<int> id[100000 + 7];
void reset() {
  int i, j;
  tym = 0;
  for (i = 0; i <= n; i++) prnt[i] = i, visit[i] = 0;
}
int find_prnt(int u) {
  if (prnt[u] == u) return u;
  return prnt[u] = find_prnt(prnt[u]);
}
void dfs(int u, int pre) {
  int v, sz, i, j;
  sz = edges[u].size();
  dis[u] = low[u] = ++tym;
  for (i = 0; i < sz; i++) {
    v = edges[u][i];
    if (id[u][i] == pre) {
      continue;
    }
    if (visit[v]) {
      low[u] = min(low[u], dis[v]);
    } else if (!visit[v]) {
      visit[v] = 1;
      dfs(v, id[u][i]);
      low[u] = min(low[u], low[v]);
      if (dis[u] < low[v]) {
        ans[id[u][i]] = 2;
      }
    }
  }
}
void mst() {
  int p1, p2, u, v, i, j, k;
  sort(arr, arr + m);
  for (i = 0; i < m; i++) {
    for (j = i; j < m and arr[j].w == arr[i].w; j++) {
      u = arr[j].u;
      v = arr[j].v;
      p1 = find_prnt(u);
      p2 = find_prnt(v);
      if (p1 == p2) {
        ans[arr[j].pos] = 1;
      } else {
        edges[p1].push_back(p2);
        id[p1].push_back(arr[j].pos);
        edges[p2].push_back(p1);
        id[p2].push_back(arr[j].pos);
      }
    }
    for (j = i; j < m and arr[j].w == arr[i].w; j++) {
      p1 = find_prnt(arr[j].u);
      p2 = find_prnt(arr[j].v);
      if (p1 != p2) {
        prnt[p2] = p1;
      }
    }
    i = j - 1;
  }
  dfs(arr[0].u, -1);
}
int main() {
  int i, j, k, u, v, w;
  scanf("%d %d", &n, &m);
  reset();
  for (i = 0; i < m; i++) {
    scanf("%d %d %d", &u, &v, &w);
    arr[i] = graph(u, v, w, i);
  }
  mst();
  for (i = 0; i < m; i++) {
    if (ans[i] == 0) {
      printf("at least one\n");
    } else if (ans[i] == 1) {
      printf("none\n");
    } else {
      printf("any\n");
    }
  }
  return 0;
}
