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 long long mod = 1e9 + 7, inf = 1e17, N = 1e6 + 10;
long long pw(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b % 2 == 1) {
      ans = 1ll * ans * a;
      ans %= mod;
    }
    b /= 2;
    a = 1ll * a * a % mod;
    a %= mod;
  }
  return ans % mod;
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
bool mark[N], h;
char o;
pair<long long, long long> p;
vector<long long> vec1, jav, vs;
vector<pair<long long, long long> > vec, vt[N];
string s[N], s1;
long long a[N], b[N], c, d, dp[N], t, n, m, k, f, ans, sum, ps, u[N], v[N],
    ch[N], par[N], dis[N], mn[N];
long long get(long long x) { return par[x] == x ? x : par[x] = get(par[x]); }
void mrg(long long u, long long v) {
  long long a1 = get(u), a2 = get(v);
  if (a1 != a2) {
    if (ch[a1] > ch[a2]) {
      swap(a1, a2);
    }
    par[a1] = a2;
    ch[a2] += ch[a1];
  }
}
void dfs(long long v, long long id, long long pd) {
  mark[b[v]] = true;
  if (id != -1) {
    s[id] = "any\n";
  }
  mn[v] = dis[v];
  long long ff = 0;
  for (auto x : vt[v]) {
    if (x.first == v) {
      continue;
    }
    if (x.first == pd) {
      ff++;
    }
    if (!mark[x.first]) {
      dis[x.first] = dis[v] + 1;
      dfs(x.first, x.second, v);
      mn[v] = min(mn[v], mn[x.first]);
    } else if (x.first != pd)
      s[x.second] = "at least one\n";
    if (x.first != pd || ff > 1) {
      mn[v] = min(mn[v], dis[x.first]);
    }
    if (mn[v] <= (dis[v] - 1)) {
      s[id] = "at least one\n";
    }
  }
}
void doo(long long it) {
  vs.push_back(it);
  b[u[it]] = get(u[it]);
  b[v[it]] = get(v[it]);
  vt[b[u[it]]].push_back({b[v[it]], it});
  vt[b[v[it]]].push_back({b[u[it]], it});
  mark[b[v[it]]] = 0;
  mark[b[u[it]]] = 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie();
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    par[i] = i;
    ch[i] = 1;
  }
  for (int i = 0; i < m; i++) {
    long long w;
    cin >> u[i] >> v[i] >> w;
    vec.push_back({w, i});
  }
  sort(vec.begin(), vec.end());
  vec.push_back({-1, -1});
  if (vec[0].second != -1) {
    doo(vec[0].second);
  }
  for (int i = 1; i <= m; i++) {
    if (vec[i].first == vec[i - 1].first) {
      if (vec[i].second != -1) {
        doo(vec[i].second);
      }
    } else {
      for (auto x : vs) {
        if (!mark[b[u[x]]]) {
          dis[b[u[x]]] = 0;
          dfs(b[u[x]], -1, -1);
        }
        if (!mark[b[v[x]]]) {
          dis[b[v[x]]] = 0;
          dfs(b[v[x]], -1, -1);
        }
      }
      for (auto x : vs) {
        if (b[u[x]] == b[v[x]]) {
          s[x] = "none\n";
        }
        mrg(u[x], v[x]);
        vt[b[u[x]]].clear();
        vt[b[v[x]]].clear();
      }
      vs.clear();
      if (vec[i].second != -1) {
        doo(vec[i].second);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    cout << s[i];
  }
}
