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>
#pragma GCC optimize("O2")
using namespace std;
inline long long input() {
  long long n;
  cin >> n;
  return n;
}
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
const int MAXN = 1e6 + 10;
const int MAXK = 1e5 + 10;
const int MOD = 1e9 + 7;
const int MOD2 = 998244353;
const long long INF = 8e18;
map<long long, long long> num[MAXN];
vector<pair<long long, long long> > adj[MAXK];
vector<long long> edge[MAXN];
vector<pair<long long, pair<long long, long long> > > edges;
int ans[MAXK];
long long par[MAXK], sz[MAXK];
bool mark[MAXK], is[MAXK];
long long dp[MAXK], h[MAXK];
long long n, m, tmp;
long long getroot(long long v) {
  if (v == par[v]) {
    return v;
  }
  return par[v] = getroot(par[v]);
}
void merg(long long v, long long u) {
  long long vp = getroot(v), up = getroot(u);
  if (vp == up) return;
  if (sz[vp] > sz[up]) {
    swap(vp, up);
  }
  par[vp] = up;
  sz[up] += sz[vp];
  sz[vp] = 0;
}
void dfs(long long v, long long parent, long long index) {
  dp[v] = h[v];
  mark[v] = true;
  for (long long i = 0; i < adj[v].size(); i++) {
    long long u = adj[v][i].first;
    long long ind = adj[v][i].second;
    if (!mark[u]) {
      h[u] = h[v] + 1;
      dfs(u, v, ind);
      dp[v] = min(dp[v], dp[u]);
    } else {
      if (u != parent) {
        dp[v] = min(dp[v], h[u]);
      }
    }
  }
  if (v != tmp) {
    if (dp[v] == h[v]) {
      is[index] = true;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  long long a, b, w;
  for (int i = 1; i <= n; i++) {
    par[i] = i;
    sz[i] = 1;
  }
  for (long long i = 0; i < m; i++) {
    cin >> a >> b >> w;
    edges.push_back({w, {a, b}});
    edge[w].push_back(i);
  }
  vector<long long> tempo;
  for (long long i = 1; i < 1000010; i++) {
    tempo.clear();
    for (long long j = 0; j < edge[i].size(); j++) {
      long long o = edge[i][j];
      a = edges[o].second.first;
      b = edges[o].second.second;
      if (getroot(a) != getroot(b)) {
        adj[getroot(a)].clear();
        adj[getroot(b)].clear();
        num[getroot(a)].clear();
        num[getroot(b)].clear();
        tempo.push_back(getroot(a));
        tempo.push_back(getroot(b));
      }
    }
    for (long long j = 0; j < edge[i].size(); j++) {
      long long o = edge[i][j];
      a = edges[o].second.first;
      b = edges[o].second.second;
      if (getroot(a) == getroot(b)) {
        ans[o] = -1;
      } else {
        adj[getroot(a)].push_back({getroot(b), o});
        adj[getroot(b)].push_back({getroot(a), o});
        num[getroot(a)][getroot(b)]++;
        num[getroot(b)][getroot(a)]++;
        mark[getroot(a)] = false;
        mark[getroot(b)] = false;
        dp[getroot(a)] = 0;
        dp[getroot(b)] = 0;
        h[getroot(a)] = 0;
        h[getroot(b)] = 0;
        is[o] = false;
      }
    }
    for (long long j = 0; j < tempo.size(); j++) {
      if (!mark[tempo[j]]) {
        tmp = tempo[j];
        dfs(tempo[j], 0, 0);
      }
    }
    for (long long j = 0; j < edge[i].size(); j++) {
      long long o = edge[i][j];
      a = edges[o].second.first;
      b = edges[o].second.second;
      if (is[o] and ans[o] != -1 and num[getroot(a)][getroot(b)] == 1) {
        ans[o] = 1;
      } else {
        if (ans[o] != -1) ans[o] = 2;
      }
    }
    for (long long j = 0; j < edge[i].size(); j++) {
      long long o = edge[i][j];
      a = edges[o].second.first;
      b = edges[o].second.second;
      merg(a, b);
    }
  }
  for (long long i = 0; i < m; i++) {
    if (ans[i] == -1) {
      cout << "none";
    } else {
      if (ans[i] == 1) {
        cout << "any";
      } else {
        cout << "at least one";
      }
    }
    cout << "\n";
  }
}
