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;
void read_file(bool outToFile = true) {}
int n, m;
vector<pair<pair<int, int>, pair<int, int> > > E;
vector<vector<pair<int, int> > > G, GG;
string ans[100000 + 9];
struct union_find {
  vector<int> par, rnk;
  union_find(int n) {
    par.resize(n);
    rnk.resize(n);
    for (int i = 0; i < n; i++) par[i] = i, rnk[i] = 0;
  }
  int find_par(int i) {
    if (i == par[i])
      return i;
    else
      return par[i] = find_par(par[i]);
  }
  bool join(int i, int j) {
    i = find_par(i);
    j = find_par(j);
    if (i == j) return false;
    if (rnk[i] < rnk[j]) swap(i, j);
    par[j] = i;
    rnk[i] += rnk[i] == rnk[j];
    return true;
  }
};
int par[100000 + 9], num[100000 + 9], low[100000 + 9];
int timer, root, rootChildren;
vector<int> bridge;
void detect(int u = 0) {
  num[u] = low[u] = timer++;
  int sz = G[u].size();
  for (int i = 0; i < sz; i++) {
    int v = G[u][i].first;
    if (num[v] == -1) {
      par[v] = u, detect(v);
      if (u == root) rootChildren++;
      if (low[v] >= num[u])
        ;
      if (low[v] > num[u]) {
        bridge.push_back(G[u][i].second);
      }
      low[u] = min(low[u], low[v]);
    } else if (v != par[u])
      low[u] = min(low[u], num[v]);
  }
}
void kruskal() {
  sort(((E).begin()), ((E).end()));
  union_find uf(n);
  G.assign(n, vector<pair<int, int> >());
  GG.assign(n, vector<pair<int, int> >());
  memset(num, -1, sizeof num);
  for (int i = 0; i < m; i++) {
    int j = i;
    while (j < m && E[j].first.first == E[i].first.first) j++;
    vector<int> node;
    for (int k = i; k < j; k++) {
      int u = E[k].second.first, v = E[k].second.second;
      int idx = E[k].first.second;
      u = uf.find_par(u), v = uf.find_par(v);
      if (u == v) continue;
      G[u].push_back(make_pair(v, idx));
      G[v].push_back(make_pair(u, idx));
      node.push_back(u);
      node.push_back(v);
    }
    sort(((node).begin()), ((node).end()));
    node.resize(unique(((node).begin()), ((node).end())) - node.begin());
    int sz = node.size();
    for (int k = 0; k < sz; k++) {
      int u = node[k];
      sort(((G[u]).begin()), ((G[u]).end()));
      for (int l = 0, szz = G[u].size(); l < szz; l++) {
        int p = l;
        while (p < szz && G[u][l].first == G[u][p].first) p++;
        GG[u].push_back(make_pair(G[u][l].first, G[u][l].second));
        if (p - l == 1)
          uf.join(u, G[u][l].first);
        else {
          for (int q = l; q < p; q++) {
            int v = G[u][q].first;
            int idx = G[u][q].second;
            ans[idx] = "at least one";
            uf.join(u, v);
          }
        }
        l = p - 1;
      }
    }
    for (int k = 0; k < sz; k++) {
      int u = node[k];
      G[u] = GG[u];
      GG[u].clear();
    }
    timer = 0;
    bridge.clear();
    for (int k = 0; k < sz; k++) {
      int u = node[k];
      if (num[u] == -1) {
        root = u;
        rootChildren = 0;
        detect(u);
      }
    }
    for (int k = 0, szz = bridge.size(); k < szz; k++) {
      int idx = bridge[k];
      if (ans[idx] == "none") ans[idx] = "any";
    }
    for (int k = 0; k < sz; k++) {
      int u = node[k];
      int szz = G[u].size();
      for (int l = 0; l < szz; l++) {
        int idx = G[u][l].second;
        if (ans[idx] == "none") ans[idx] = "at least one";
      }
      G[u].clear();
      num[u] = -1;
    }
    i = j - 1;
  }
}
int main() {
  read_file();
  while (scanf("%d%d", &n, &m) != EOF) {
    E.resize(m);
    for (int i = 0; i < m; i++) {
      int u, v, w;
      scanf("%d%d%d", &u, &v, &w);
      u--, v--;
      E[i] = pair<pair<int, int>, pair<int, int> >(make_pair(w, i),
                                                   make_pair(u, v));
      ans[i] = "none";
    }
    kruskal();
    for (int i = 0; i < m; i++) printf("%s\n", ans[i].c_str());
    printf("\n");
  }
}
