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 LL = long long;
using ULL = unsigned long long;
using PII = pair<int, int>;
using PIL = pair<int, LL>;
using PLL = pair<LL, LL>;
inline void quickread() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
class UF {
 public:
  vector<int> fa;
  vector<int> sz;
  int n;
  int comp_cnt;

 public:
  UF(int _n) : n(_n), comp_cnt(_n), fa(_n), sz(_n, 1) {
    iota(fa.begin(), fa.end(), 0);
  }
  int findset(int x) { return fa[x] == x ? x : fa[x] = findset(fa[x]); }
  void unite(int x, int y) {
    if (sz[x] < sz[y]) {
      swap(x, y);
    }
    fa[y] = x;
    sz[x] += sz[y];
    --comp_cnt;
  }
  bool findAndUnite(int x, int y) {
    int x0 = findset(x);
    int y0 = findset(y);
    if (x0 != y0) {
      unite(x0, y0);
      return true;
    }
    return false;
  }
};
class TarjanSCC {
 private:
  static vector<int> low, dfn, group;
  static int ts;

 private:
  static void getCuttingEdge_(const vector<vector<int>>& edges,
                              const vector<vector<int>>& edges_id, int u,
                              int last, vector<int>& ans) {
    low[u] = dfn[u] = ++ts;
    for (int i = 0; i < edges[u].size(); ++i) {
      int v = edges[u][i];
      int id = edges_id[u][i];
      if (dfn[v] == -1) {
        getCuttingEdge_(edges, edges_id, v, id, ans);
        low[u] = min(low[u], low[v]);
        if (low[v] > dfn[u]) {
          ans.push_back(id);
        }
      } else if (id != last) {
        low[u] = min(low[u], dfn[v]);
      }
    }
  }

 public:
  static vector<int> getCuttingEdge(int n, const vector<vector<int>>& edges,
                                    const vector<vector<int>>& edges_id) {
    low.assign(n, -1);
    dfn.assign(n, -1);
    ts = -1;
    vector<int> ans;
    for (int i = 0; i < n; ++i) {
      if (dfn[i] == -1) {
        getCuttingEdge_(edges, edges_id, i, -1, ans);
      }
    }
    return ans;
  }
};
vector<int> TarjanSCC::low, TarjanSCC::dfn, TarjanSCC::group;
int TarjanSCC::ts;
struct Edge {
  int x, y, v, id;
  Edge(int _x, int _y, int _v, int _id) : x(_x), y(_y), v(_v), id(_id) {}
  bool operator<(const Edge& that) const { return v < that.v; }
};
int n, m;
int x, y, v;
inline void work() {
  cin >> n >> m;
  vector<Edge> edges;
  for (int i = 0; i < m; ++i) {
    cin >> x >> y >> v;
    edges.emplace_back(x - 1, y - 1, v, i);
  }
  sort(edges.begin(), edges.end());
  UF uf(n);
  vector<int> ans(m, 1);
  for (int i = 0; i < m;) {
    int j = i;
    while (j < m && edges[j].v == edges[i].v) {
      ++j;
    }
    unordered_map<int, int> s;
    int subg_n = 0;
    for (int k = i; k < j; ++k) {
      Edge& edge = edges[k];
      int fax = uf.findset(edge.x);
      int fay = uf.findset(edge.y);
      if (fax != fay) {
        if (!s.count(fax)) {
          s[fax] = subg_n++;
        }
        if (!s.count(fay)) {
          s[fay] = subg_n++;
        }
      }
    }
    vector<vector<int>> subg_edges(subg_n), subg_id(subg_n);
    for (int k = i; k < j; ++k) {
      Edge& edge = edges[k];
      int fax = uf.findset(edge.x);
      int fay = uf.findset(edge.y);
      if (fax != fay) {
        int sx = s[fax], sy = s[fay];
        subg_edges[sx].push_back(sy);
        subg_id[sx].push_back(edge.id);
        subg_edges[sy].push_back(sx);
        subg_id[sy].push_back(edge.id);
      } else {
        ans[edge.id] = 2;
      }
    }
    vector<int> result = TarjanSCC::getCuttingEdge(subg_n, subg_edges, subg_id);
    for (int edge_id : result) {
      ans[edge_id] = 0;
    }
    for (int k = i; k < j; ++k) {
      Edge& edge = edges[k];
      uf.findAndUnite(edge.x, edge.y);
    }
    i = j;
  }
  for (int i = 0; i < m; ++i) {
    if (ans[i] == 0) {
      cout << "any\n";
    } else if (ans[i] == 1) {
      cout << "at least one\n";
    } else {
      cout << "none\n";
    }
  }
}
int main() {
  quickread();
  work();
  return 0;
}
