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.
import java.io.*;
import java.util.*;
public class a {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = input.nextInt(), m = input.nextInt();
	PriorityQueue<Edge> pq = new PriorityQueue<Edge>();
	for(int i = 0; i<m; i++) pq.add(new Edge(input.nextInt()-1, input.nextInt()-1, input.nextInt(),i));
	boolean[] atLeastOne = new boolean[m];
	boolean[] all = new boolean[m];
	DisjointSet ds = new DisjointSet(n);
	while(!pq.isEmpty())
	{
		int weight = pq.peek().c;
		ArrayList<Edge> list = new ArrayList<Edge>();
		while(!pq.isEmpty() && pq.peek().c == weight) list.add(pq.poll());
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		int idx = 0;
		for(Edge e : list)
		{
			int fa = ds.find(e.a), fb = ds.find(e.b);
			if(fa != fb)
			{
				atLeastOne[e.i] = true;
				if(!map.containsKey(fa)) map.put(fa, idx++);
				if(!map.containsKey(fb)) map.put(fb, idx++);
			}
		}
		BridgeFinder bf = new BridgeFinder(idx);
		for(Edge e : list)
		{
			int fa = ds.find(e.a), fb = ds.find(e.b);
			if(fa != fb)
			{
				bf.addEdge(map.get(fa), map.get(fb));
			}
		}
		bf.go();
		idx = 0;
		for(Edge e : list)
		{
			int fa = ds.find(e.a), fb = ds.find(e.b);
			if(fa != fb)
			{
				if(bf.bridge[idx]) all[e.i] = true;
				idx++;
			}
		}
		for(Edge e : list) ds.union(e.a, e.b);
	}
	for(int i = 0; i<m; i++)
	{
		if(all[i]) out.println("any");
		else if(atLeastOne[i]) out.println("at least one");
		else out.println("none");
	}
	out.close();
}
static class BridgeFinder
{
	ArrayList<Edge>[] g;
	int n;
	int m;
	boolean[] bridge;
	int[] pre, lowlink, id;
	int count;
	int comps;
	public BridgeFinder(int nn)
	{
		n = nn;
		g = new ArrayList[n];
		for(int i = 0; i<n; i++) g[i] = new ArrayList<Edge>();
	}
	void dfs(int i, int last)
	{
		pre[i] = count++;
		lowlink[i] = pre[i];
		for(Edge e : g[i])
		{
			if(pre[e.to] == -1)
			{
				dfs(e.to, e.i);
			}
			if(e.i != last)
			{
				lowlink[i] = Math.min(lowlink[i], lowlink[e.to]);
			}
		}
		if(last != -1 && pre[i] <= lowlink[i]) bridge[last] = true;
	}
	void go()
	{
		bridge = new boolean[m];
		pre = new int[n];
		Arrays.fill(pre, -1);
		lowlink = new int[n];
		for(int i = 0; i<n; i++)
			if(pre[i] == -1)
				dfs(i, -1);
		getIds();
	}
	void getIds()
	{
		id = new int[n];
		Arrays.fill(id, -1);
		for(int i = 0; i<n; i++)
		{
			if(id[i] != -1) continue;
			id[i] = comps;
			Queue<Integer> q = new LinkedList<Integer>();
			q.add(i);
			while(!q.isEmpty())
			{
				int at = q.poll();
				for(Edge e : g[at])
				{
					if(bridge[e.i] || id[e.to] != -1) continue;
					id[e.to] = comps;
					q.add(e.to);
				}
			}
			comps++;
		}
	}
	void addEdge(int a, int b)
	{
		g[a].add(new Edge(b, m));
		g[b].add(new Edge(a, m++));
	}
	static class Edge
	{
		int to, i;
		public Edge(int tt, int ii)
		{
			to = tt; i = ii;
		}
	}
}
public static class DisjointSet
{
	int[] map; //negative if root, more negative means bigger set; if nonnegative, then it indicates the parent 
	public DisjointSet(int n)
	{
		map = new int[n+1];
		Arrays.fill(map, -1);
	}
	public int find(int x)
	{
		if(map[x] < 0) return x;
	    return map[x] = find(map[x]);
	}
	public void union(int a, int b)
	{
		int roota = find(a), rootb = find(b);
		if(roota == rootb)
			return;
		if(map[roota] < map[rootb])
		{
			map[roota] += map[rootb]; //add the sizes
			map[rootb] = roota; //connect the smaller to the bigger
		}
		else
		{
			map[rootb] += map[roota];
			map[roota] = rootb;
		}
	}
}
static class Edge implements Comparable<Edge>
{
	int a, b, c, i;
	public Edge(int aa, int bb, int cc, int ii)
	{
		a = aa; b = bb; c = cc; i = ii;
	}
	@Override
	public int compareTo(Edge o) {
		// TODO Auto-generated method stub
		return c - o.c;
	}
}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

