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 double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
struct data {
  int a, b, w;
} edge[100005];
int idx[100005];
bool compare(int a, int b) { return edge[a].w < edge[b].w; }
struct data2 {
  int v, at;
  struct data2 *next;
} adj[3 * 100005], *head[100005];
void add_edge(int u, int v, int id) {
  static int tail;
  adj[++tail].v = v;
  adj[tail].at = id;
  adj[tail].next = head[u];
  head[u] = adj + tail;
}
int type[100005];
int boss[100005];
int find_boss(int x) {
  if (boss[x] == 0) return x;
  return boss[x] = find_boss(boss[x]);
}
set<int> S;
int dpt[100005], low[100005];
bitset<100005> visit;
static int stamp;
void tarjan(int vtx) {
  dpt[vtx] = low[vtx] = ++stamp;
  for (data2 *p = head[vtx]; p != NULL; p = p->next) {
    if (visit[p->at]) continue;
    visit[p->at] = true;
    if (dpt[p->v] != 0)
      low[vtx] = min(low[vtx], dpt[p->v]);
    else {
      tarjan(p->v);
      if (low[p->v] > dpt[vtx]) type[p->at] = 2;
      low[vtx] = min(low[vtx], low[p->v]);
    }
  }
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    data &e = edge[i];
    scanf("%d %d %d", &e.a, &e.b, &e.w);
    idx[i] = i;
  }
  sort(idx + 1, idx + m + 1, compare);
  for (int i = 1, j = 0; i <= m; i = j) {
    for (j = i; j <= m; j++)
      if (edge[idx[j]].w != edge[idx[i]].w) break;
    for (__typeof((S).begin()) cc = (S).begin(); cc != (S).end(); cc++) {
      dpt[*cc] = low[*cc] = 0;
      head[*cc] = NULL;
    }
    S.clear();
    ::stamp = 0;
    for (int e = i; e < j; e++) {
      int u = find_boss(edge[idx[e]].a);
      int v = find_boss(edge[idx[e]].b);
      if (u != v) {
        type[idx[e]] = 1;
        add_edge(u, v, idx[e]);
        add_edge(v, u, idx[e]);
        S.insert(u);
        S.insert(v);
      }
    }
    for (__typeof((S).begin()) ss = (S).begin(); ss != (S).end(); ss++)
      if (dpt[*ss] == 0) tarjan(*ss);
    for (int e = i; e < j; e++) {
      int u = find_boss(edge[idx[e]].a);
      int v = find_boss(edge[idx[e]].b);
      if (u != v) boss[u] = v;
    }
  }
  for (int i = 1; i <= m; i++)
    if (type[i] == 0)
      puts("none");
    else if (type[i] == 1)
      puts("at least one");
    else
      puts("any");
  return 0;
}
