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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class zizo {
	static HashMap<Integer, ArrayList<Triple>> map;
	static HashMap<Integer, Integer> dfs_num, dfs_low;
	static HashSet<Integer> set;
	static String[] ans;
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt(), M = sc.nextInt();
		Edge[] edges = new Edge[M];
		for(int i = 0; i < M; i++ )
			edges[i] = new Edge(sc.nextInt() - 1, sc.nextInt() - 1, i, sc.nextInt());
		Arrays.sort(edges);
		ans = new String[M];
		UnionFind uf = new UnionFind();
		for(int i = 0; i < N; i++)
			uf.makeSet(i);
		int val = edges[0].w;
		for(int i = 0; i < M; i++) {
			map = new HashMap();
			dfs_num = new HashMap();
			dfs_low = new HashMap();
			set = new HashSet();
			int j = i;
			while(j < M && val == edges[j].w) {
				int u = uf.findSet(edges[j].u), v = uf.findSet(edges[j].v);
				if(u == v)
					ans[edges[j].idx] = "none";
				else {
					if(!map.containsKey(u)) {
						ArrayList<Triple> list = new ArrayList<Triple>();
						list.add(new Triple(v, edges[j].idx, edges[j].w));
						map.put(u, list);
					}
					else
						map.get(u).add(new Triple(v, edges[j].idx, edges[j].w));
					if(!map.containsKey(v)) {
						ArrayList<Triple> list = new ArrayList<Triple>();
						list.add(new Triple(u, edges[j].idx, edges[j].w));
						map.put(v, list);
					}
					else
						map.get(v).add(new Triple(u, edges[j].idx, edges[j].w));
				}
				j++;
			}
			for(int x : map.keySet())
				if(!dfs_num.containsKey(x))
					findBridges(x, -1, 0);
//			for(Map.Entry<Integer, ArrayList<Triple>> e : map.entrySet())
//				System.out.println(e.getKey() + ": " + e.getValue());
//			for(Map.Entry<Integer, Integer> e : dfs_num.entrySet())
//				System.out.println(e.getKey() + ": " + e.getValue());
//			for(Map.Entry<Integer, Integer> e : dfs_low.entrySet())
//				System.out.println(e.getKey() + ": " + e.getValue());
//			System.out.println(set);
//			System.out.println("--------------------------------");
			if(j != M)
				val = edges[j].w;
			while(i < j) {
				uf.union(edges[i].u, edges[i].v);
				i++;
			}
			i--;
		}
		for(int i = 0; i < ans.length; i++)
			out.println(ans[i] == null ? "at least one" : ans[i]);
		out.flush();
		out.close();
	}
	
	public static void findBridges(int u, int p, int c) {
		dfs_num.put(u, c);
		dfs_low.put(u, c);
		c++;
		for(Triple t : map.get(u)) {
			if(!dfs_num.containsKey(t.v)) {
				set.add(t.idx);
				findBridges(t.v, u, c);
				dfs_low.put(u, Math.min(dfs_low.get(u), dfs_low.get(t.v)));
				if(dfs_low.get(t.v) > dfs_num.get(u))
					ans[t.idx] = "any";
			}
			else if(!set.contains(t.idx))
				dfs_low.put(u, Math.min(dfs_low.get(u), dfs_num.get(t.v)));
		}
	}

	static class Triple implements Comparable<Triple>{
		int v, idx, w;

		public Triple(int a, int b, int c) {
			v = a;
			idx = b;
			w = c;
		}
		
		public String toString() {
			return v + " " + idx + " " + w;
		}
		
		public int compareTo(Triple t) {return idx - t.idx;}
	}

	static class Edge implements Comparable<Edge> {
		int u, v, idx, w;

		public Edge(int a, int b, int c, int d) {
			u = a;
			v = b;
			idx = c;
			w = d;
		}

		public int compareTo(Edge x) {
			return w - x.w;
		}
	}

	static class UnionFind {
		HashMap<Integer, Node> map;

		public UnionFind() {
			map = new HashMap<Integer, Node>();
		}

		public void makeSet(int data) {
			Node n = new Node(data);
			map.put(data, n);
		}

		public Node findSet(Node n) {
			if(n.parent == n)
				return n;
			return n.parent = findSet(n.parent);
		}

		public int findSet(int data) {
			return findSet(map.get(data)).data;
		}

		public boolean union(int x, int y) {
			Node p1 = map.get(findSet(x)), p2 = map.get(findSet(y));
			if(p1 == p2)
				return false;
			if(p1.rank >= p2.rank) {
				p2.parent = p1;
				if(p1.rank == p2.rank)
					p1.rank++;
				p1.size+=p2.size;
			}
			else {
				p1.parent = p2;
				p2.size+=p1.size;
			}
			return true;
		}
		public int getSize(int data) {
			return findSet(map.get(data)).size;
		}
	}

	static class Node {
		int data;
		int rank;
		int size;
		Node parent;

		public Node(int a) {
			data = a;
			rank = 0;
			size = 1;
			parent = this;
		}
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {return br.readLine();}

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

		public boolean ready() throws IOException {return br.ready();}

	}
}