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 MaxN = 100000 + 500;
enum inMST { none, any, atLeastOne };
struct Edge {
  int a, b, num;
  long long cost;
  static int amount;
  Edge(int = 0, int = 0, long long = 0);
  bool operator<(const Edge &) const;
};
bool Edge::operator<(const Edge &e) const {
  return a < e.a || (a == e.a && (b < e.b || (cost < e.cost)));
}
bool cmpCost(const Edge &a, const Edge &b) { return a.cost < b.cost; }
int Edge::amount = 0;
Edge::Edge(int v1, int v2, long long w) : a(v1), b(v2), cost(w) {
  num = amount++;
}
vector<Edge> edges;
int n, m;
inMST ans[MaxN];
int parent[MaxN];
int Rank[MaxN];
int get_parent(int v) {
  if (parent[v] == v) return v;
  return parent[v] = get_parent(parent[v]);
}
void join(int a, int b) {
  a = get_parent(a);
  b = get_parent(b);
  if (a == b) return;
  if (Rank[a] < Rank[b]) swap(a, b);
  parent[b] = a;
  if (Rank[a] == Rank[b]) ++Rank[a];
}
void init() {
  for (int i = 0; i < n; ++i) parent[i] = i;
  edges.reserve(m);
  for (int i = 0; i < m; ++i) ans[i] = inMST::none;
}
void inc(map<pair<int, int>, int> &counter, const pair<int, int> &index) {
  if (counter.find(index) == counter.end())
    counter[index] = 1;
  else
    counter[index] += 1;
}
vector<vector<pair<int, int> > > graph;
vector<bool> visited;
vector<int> dp, tin;
int tm;
void bridges_search(int v, int edgeNum = -1) {
  visited[v] = true;
  tin[v] = dp[v] = tm++;
  for (auto to : graph[v]) {
    if (to.second == edgeNum) continue;
    if (visited[to.first]) {
      dp[v] = min(dp[v], tin[to.first]);
    } else {
      bridges_search(to.first, to.second);
      dp[v] = min(dp[v], dp[to.first]);
      if (dp[to.first] > tin[v]) ans[to.second] = inMST::any;
    }
  }
}
void Kruskal() {
  sort(edges.begin(), edges.end(), cmpCost);
  graph.resize(n);
  visited.assign(n, false);
  tin.resize(n);
  dp.resize(n);
  set<int> vertexes;
  for (int i = 0, cs; i < m; i += cs) {
    cs = 0;
    while (i + cs < m && edges[i + cs].cost == edges[i].cost) ++cs;
    vertexes.clear();
    for (int j = i, a, b; j < i + cs; ++j) {
      Edge edge(edges[j]);
      if ((a = get_parent(edge.a)) != (b = get_parent(edge.b))) {
        ans[edge.num] = inMST::atLeastOne;
        graph[a].push_back(make_pair(b, edge.num));
        graph[b].push_back(make_pair(a, edge.num));
        vertexes.insert(a);
        vertexes.insert(b);
      }
    }
    tm = 0;
    for (int v : vertexes) bridges_search(v);
    for (int j = i, a, b; j < i + cs; ++j) {
      if ((a = get_parent(edges[j].a)) != (b = get_parent(edges[j].b))) {
        graph[a].pop_back();
        graph[b].pop_back();
        visited[a] = visited[b] = false;
      }
    }
    for (int j = i; j < i + cs; ++j) {
      join(edges[j].a, edges[j].b);
    }
  }
}
int main() {
  cin >> n >> m;
  init();
  for (int i = 0, a, b, c; i < m; ++i) {
    cin >> a >> b >> c;
    --a, --b;
    edges.push_back(Edge(a, b, c));
  }
  Kruskal();
  for (int i = 0; i < m; ++i) {
    switch (ans[i]) {
      case none:
        cout << "none" << endl;
        break;
      case atLeastOne:
        cout << "at least one" << endl;
        break;
      case any:
        cout << "any" << endl;
        break;
    }
  }
  return 0;
}
