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 INF = 2e9;
const int MAXn = 1e5 + 10;
struct Edge {
  int v1, v2, w, ind;
  Edge() {}
  Edge(int v1, int v2, int w) : v1(v1), v2(v2), w(w) {}
  bool operator<(const Edge& e) const { return w < e.w; }
};
Edge e[MAXn];
struct DSU {
  int par[MAXn], h[MAXn];
  DSU() {
    for (int i = 0, __e = MAXn; i < __e; i++) par[i] = i, h[i] = 0;
  }
  int find_par(int v) { return par[v] == v ? v : (par[v] = find_par(par[v])); }
  bool union_set(int v1, int v2) {
    v1 = find_par(v1);
    v2 = find_par(v2);
    if (v1 == v2) return false;
    if (h[v1] < h[v2])
      par[v1] = v2;
    else {
      par[v2] = v1;
      h[v1] += (h[v1] == h[v2]);
    }
    return true;
  }
} dsu;
int sol[MAXn];
vector<int> nb2[MAXn];
set<pair<int, int> > bridge;
int h[MAXn], mxh[MAXn];
bool mark[MAXn];
void dfs(int v) {
  mark[v] = true;
  mxh[v] = h[v];
  bool f = false;
  for (__typeof(nb2[v].begin()) _ind = (nb2[v]).begin(); _ind != (nb2[v]).end();
       _ind++)
    for (bool _flag = true; _flag;)
      for (__typeof(*(nb2[v]).begin())& u = *_ind; _flag; _flag = false)
        if (mark[u] == 0) {
          h[u] = h[v] + 1;
          dfs(u);
          mxh[v] = min(mxh[v], mxh[u]);
          if (h[v] < mxh[u]) {
            bridge.insert(pair<int, int>(u, v));
            bridge.insert(pair<int, int>(v, u));
          }
        } else {
          if (f || h[u] + 1 != h[v]) mxh[v] = min(mxh[v], h[u]);
          if (h[u] + 1 == h[v]) f = true;
        }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0, __e = m; i < __e; i++) {
    cin >> e[i].v1 >> e[i].v2 >> e[i].w;
    e[i].ind = i;
    e[i].v1--, e[i].v2--;
  }
  sort(e, e + m);
  for (int i = 0; i < m;) {
    bridge.clear();
    int j;
    for (j = i + 1; j < m && e[j].w == e[i].w; j++)
      ;
    for (int k = i; k < j; k++) {
      int p1 = dsu.find_par(e[k].v1);
      int p2 = dsu.find_par(e[k].v2);
      if (p1 == p2)
        sol[e[k].ind] = -1;
      else {
        nb2[p1].push_back(p2);
        nb2[p2].push_back(p1);
        mark[p1] = mark[p2] = false;
      }
    }
    for (int k = i; k < j; k++) {
      int p1 = dsu.find_par(e[k].v1);
      if (!mark[p1]) {
        h[p1] = 0;
        dfs(p1);
      }
    }
    for (int k = i; k < j; k++) {
      int p1 = dsu.find_par(e[k].v1);
      int p2 = dsu.find_par(e[k].v2);
      nb2[p1].clear();
      nb2[p2].clear();
    }
    for (int k = i; k < j; k++) {
      int p1 = dsu.find_par(e[k].v1);
      int p2 = dsu.find_par(e[k].v2);
      if (sol[e[k].ind] != -1) {
        if (bridge.count(pair<int, int>(p1, p2)))
          sol[e[k].ind] = 1;
        else
          sol[e[k].ind] = 0;
      }
    }
    for (int k = i; k < j; k++) dsu.union_set(e[k].v1, e[k].v2);
    i = j;
  }
  for (int i = 0, __e = m; i < __e; i++)
    if (sol[i] == -1)
      cout << "none" << '\n';
    else if (sol[i] == 0)
      cout << "at least one" << '\n';
    else
      cout << "any" << '\n';
  return 0;
}
