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;
struct edge {
  int s, p, w, ind;
};
bool cmp(edge a, edge b) {
  if (a.w < b.w) return true;
  return false;
}
const int max_N = 100000 + 20;
const int INF = 1000000001;
bool mark[max_N], pass[max_N];
int n, m, par[max_N], size[max_N], h[max_N], min_d[max_N], ans[max_N];
string a[max_N];
vector<pair<int, int> > adj[max_N];
set<int> node;
edge e[max_N];
int findpar(int v) {
  if (par[par[v]] != par[v]) par[v] = findpar(par[v]);
  return par[v];
}
void dsu(int a, int b) {
  a = findpar(a), b = findpar(b);
  if (a == b) return;
  if (size[a] < size[b]) swap(a, b);
  par[b] = a, size[a] += size[b];
}
void dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < (int)adj[v].size(); i++) {
    int u = adj[v][i].first, r = adj[v][i].second;
    if (!mark[u]) {
      pass[r] = true;
      h[u] = h[v] + 1;
      dfs(u);
      min_d[v] = min(min_d[v], min_d[u]);
    } else if (!pass[r]) {
      min_d[v] = min(min_d[v], h[u]);
      pass[r] = true;
    }
  }
}
void dfs_all() {
  for (set<int>::iterator it = node.begin(); it != node.end(); it++) {
    int i = *it;
    if (!mark[i]) {
      h[i] = 0;
      dfs(i);
    }
    mark[i] = false;
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d %d %d", &a, &b, &e[i].w);
    e[i].ind = i, e[i].s = a - 1, e[i].p = b - 1;
  }
  sort(e, e + m, cmp);
  for (int i = 0; i < n; i++) par[i] = i, size[i] = 1, min_d[i] = INF;
  int pt1 = 0, pt2 = 0;
  while (pt1 < m) {
    while (e[pt1].w == e[pt2].w) {
      int u = findpar(e[pt2].s), v = findpar(e[pt2].p);
      if (u != v) {
        ans[pt2] = 1;
        node.insert(u), node.insert(v);
        adj[u].push_back(make_pair(v, pt2));
        adj[v].push_back(make_pair(u, pt2));
      }
      pt2++;
    }
    dfs_all();
    for (set<int>::iterator it = node.begin(); it != node.end(); it++) {
      int u = *it;
      for (int j = 0; j < (int)adj[u].size(); j++) {
        int ee = adj[u][j].second;
        if (h[u] > h[adj[u][j].first] && min_d[u] < h[u]) ans[ee] = 2;
        pass[ee] = false;
      }
      min_d[u] = INF, adj[u].clear();
    }
    node.clear();
    while (pt1 < pt2) {
      if (ans[pt1] > 0) dsu(e[pt1].s, e[pt1].p);
      pt1++;
    }
  }
  for (int i = 0; i < m; i++) {
    int pt = e[i].ind;
    if (ans[i] == 0)
      a[pt] = "none";
    else if (ans[i] == 1)
      a[pt] = "any";
    else
      a[pt] = "at least one";
  }
  for (int i = 0; i < m; i++) cout << a[i] << endl;
  return 0;
}
