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;
using namespace std;
template <class T>
ostream& operator<<(ostream& out, const vector<T>& data) {
  out << "[";
  for (int i = 0; i < (int)data.size(); ++i)
    out << data[i] << (i == data.size() - 1 ? "" : ",");
  out << "]";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const set<T>& s) {
  out << "{";
  for (typename set<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const multiset<T>& s) {
  out << "{";
  for (typename multiset<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << "(" << p.first << "," << p.second << ")";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const map<T1, T2>& m) {
  for (typename map<T1, T2>::const_iterator itr = m.begin(); itr != m.end();
       ++itr)
    out << itr->first << "->" << itr->second << " ";
  return out;
}
int belong[200000];
int father[200000];
int find(int x) {
  if (belong[x] < 0)
    return x;
  else
    return belong[x] = find(belong[x]);
}
inline void merge(int x1, int x2) {
  int f1 = find(x1);
  int f2 = find(x2);
  if (rand() & 1)
    belong[f1] = f2;
  else
    belong[f2] = f1;
}
int N, M;
struct Edge {
  int a, b, w;
  int id;
  int result;
  bool operator<(const Edge& e) const { return w < e.w; }
};
vector<Edge> es;
struct Graph {
  int Nodes;
  map<int, int> idmap;
  vector<vector<int> > ge;
  vector<vector<int> > g;
  vector<int> dfn;
  vector<int> low;
  int timestamp;
  int getid(int x) {
    x = find(x);
    if (idmap.find(x) == idmap.end()) {
      int t = idmap.size();
      idmap[x] = t;
    }
    return idmap[x];
  }
  void clear() { idmap.clear(); }
  void finishAddNode() {
    Nodes = idmap.size();
    ge.clear();
    g.clear();
    g.resize(Nodes);
    ge.resize(Nodes);
    dfn = vector<int>(Nodes, -1);
    low = vector<int>(Nodes, 99999999);
    timestamp = 0;
  }
  void addEdge(int x1, int x2, int eid) {
    int t1 = getid(x1);
    int t2 = getid(x2);
    g[t1].push_back(t2);
    g[t2].push_back(t1);
    ge[t1].push_back(eid);
    ge[t2].push_back(eid);
  }
  void dfs(int x, int f) {
    timestamp++;
    dfn[x] = timestamp;
    low[x] = dfn[x];
    bool metFather = false;
    for (int i = 0; i < g[x].size(); ++i) {
      int y = g[x][i];
      if (!metFather && y == f) {
        metFather = true;
        continue;
      }
      if (dfn[y] < 0) {
        dfs(y, x);
        low[x] = min(low[x], low[y]);
      } else
        low[x] = min(low[x], dfn[y]);
    }
  }
  void dfs() {
    for (int i = 0; i < Nodes; ++i)
      if (dfn[i] < 0) dfs(i, -1);
    for (int x = 0; x < Nodes; ++x)
      for (int i = 0; i < g[x].size(); ++i) {
        int y = g[x][i];
        int eid = ge[x][i];
        if (dfn[x] < dfn[y]) {
          if (low[y] < dfn[y]) {
            es[eid].result = 2;
          }
        }
      }
  }
};
Graph g;
int ans[200000];
void york() {
  memset(belong, -1, sizeof(belong));
  memset(father, -1, sizeof(father));
  scanf("%d%d", &N, &M);
  es.resize(M);
  for (int i = 0; i < M; ++i) {
    es[i].id = i;
    es[i].result = 0;
    scanf("%d%d%d", &es[i].a, &es[i].b, &es[i].w);
  }
  sort(es.begin(), es.end());
  int i = 0;
  while (i < M) {
    int j = i;
    while (j < M && es[j].w == es[i].w) j++;
    g.clear();
    for (int k = i; k < j; ++k) {
      if (find(es[k].a) == find(es[k].b))
        es[k].result = 0;
      else {
        es[k].result = 1;
        g.getid(es[k].a);
        g.getid(es[k].b);
      }
    }
    g.finishAddNode();
    for (int k = i; k < j; ++k) {
      if (es[k].result == 1) {
        g.addEdge(es[k].a, es[k].b, k);
      }
    }
    g.dfs();
    for (int k = i; k < j; ++k)
      if (find(es[k].a) != find(es[k].b)) merge(es[k].a, es[k].b);
    i = j;
  }
  for (int i = 0; i < es.size(); ++i) ans[es[i].id] = es[i].result;
  for (int i = 0; i < M; ++i) {
    if (ans[i] == 0) printf("none\n");
    if (ans[i] == 1) printf("any\n");
    if (ans[i] == 2) printf("at least one\n");
  }
}
int main() {
  york();
  return 0;
}
