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 require(bool cond, const string& message = "Runtime error") {
  if (!cond) {
    cerr << message << endl;
    assert(false);
  }
}
const int NMAX = 200000;
int leader[NMAX];
bool used[NMAX];
int pre[NMAX];
int h[NMAX];
int up(int v) {
  if (v != leader[v]) leader[v] = up(leader[v]);
  return leader[v];
}
void merge(int v, int u) {
  v = up(v);
  u = up(u);
  if (v != u) {
    if (rand() & 1)
      leader[v] = u;
    else
      leader[u] = v;
  }
}
struct Edge {
  int u, v, w;
  int id;
};
vector<pair<int, int> > g[NMAX];
int ht;
vector<int> bridges;
void dfs(int v, int prev) {
  used[v] = true;
  h[v] = pre[v] = ht++;
  for (int i = 0; i < int(g[v].size()); ++i) {
    int u = g[v][i].first;
    if (u != prev) {
      if (!used[u]) {
        dfs(u, v);
        pre[v] = min(pre[v], pre[u]);
        if (pre[u] > h[v]) {
          bridges.push_back(g[v][i].second);
        }
      } else {
        pre[v] = min(pre[v], h[u]);
      }
    }
  }
}
bool operator<(const Edge& a, const Edge& b) { return a.w < b.w; }
int ans[NMAX];
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < int(n); ++i) leader[i] = i;
  for (int i = 0; i < int(m); ++i) ans[i] = -1;
  vector<Edge> edges(m);
  for (int i = 0; i < int(m); ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    Edge e = {u, v, w, i};
    edges[i] = e;
  }
  sort(edges.begin(), edges.end());
  int l = 0;
  while (l < edges.size()) {
    int r = l;
    while (r < edges.size() && edges[r].w == edges[l].w) ++r;
    vector<Edge> nes;
    vector<int> vs;
    for (int i = l; i < r; ++i) {
      Edge e;
      e.u = up(edges[i].u);
      e.v = up(edges[i].v);
      if (e.u == e.v) {
        ans[edges[i].id] = 0;
        continue;
      }
      e.id = edges[i].id;
      vs.push_back(e.u);
      vs.push_back(e.v);
      nes.push_back(e);
    }
    sort(vs.begin(), vs.end());
    vs.erase(unique(vs.begin(), vs.end()), vs.end());
    map<pair<int, int>, int> cnt;
    for (int i = 0; i < int(nes.size()); ++i) {
      int u = lower_bound(vs.begin(), vs.end(), nes[i].u) - vs.begin();
      assert(vs[u] == nes[i].u);
      nes[i].u = u;
      int v = lower_bound(vs.begin(), vs.end(), nes[i].v) - vs.begin();
      assert(vs[v] == nes[i].v);
      nes[i].v = v;
      if (nes[i].u > nes[i].v) swap(nes[i].u, nes[i].v);
      cnt[make_pair(nes[i].u, nes[i].v)]++;
    }
    for (int i = 0; i < int(vs.size()); ++i) g[i].clear();
    int nn = vs.size();
    for (int i = 0; i < int(nes.size()); ++i) {
      if (cnt[make_pair(nes[i].u, nes[i].v)] > 1) {
        ans[nes[i].id] = 2;
        continue;
      }
      assert(nes[i].u < nn);
      assert(nes[i].v < nn);
      assert(nes[i].u >= 0);
      assert(nes[i].v >= 0);
      g[nes[i].u].push_back(make_pair(nes[i].v, nes[i].id));
      g[nes[i].v].push_back(make_pair(nes[i].u, nes[i].id));
    }
    for (int i = 0; i < int(nes.size()); ++i) {
      if (cnt[make_pair(nes[i].u, nes[i].v)] > 1) {
        cnt[make_pair(nes[i].u, nes[i].v)] = 1;
        g[nes[i].u].push_back(make_pair(nes[i].v, nes[i].id));
        g[nes[i].v].push_back(make_pair(nes[i].u, nes[i].id));
      }
    }
    bridges.clear();
    for (int i = 0; i < int(nn); ++i) used[i] = false;
    ht = 0;
    for (int v = 0; v < int(nn); ++v) {
      if (!used[v]) {
        dfs(v, -1);
      }
    }
    for (int i = 0; i < int(bridges.size()); ++i) {
      if (ans[bridges[i]] == -1) ans[bridges[i]] = 1;
    }
    for (int i = l; i < r; ++i) {
      if (ans[edges[i].id] == -1) {
        ans[edges[i].id] = 2;
      }
      merge(edges[i].u, edges[i].v);
    }
    l = r;
  }
  for (int i = 0; i < int(n); ++i) leader[i] = i;
  for (int i = 0; i < int(edges.size()); ++i) {
    if (ans[edges[i].id] == 1) {
      int u = edges[i].u;
      int v = edges[i].v;
      assert(up(u) != up(v));
      merge(u, v);
    }
  }
  for (int i = 0; i < int(m); ++i) {
    assert(ans[i] != -1);
    if (ans[i] == 0) {
      cout << "none" << endl;
    } else if (ans[i] == 1) {
      cout << "any" << endl;
    } else {
      cout << "at least one" << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
