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 Main
{
	static final boolean _DEBUG = false;

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner(BufferedReader _br) {
			br = _br;
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					e.printStackTrace();
					return "";
				}
			}
			return st.nextToken();
		}

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}

	static MyScanner   scan;
	static PrintWriter out;

	static int debugCount = 0;
	static void debug(String msg) {
		if (_DEBUG && debugCount < 200) {
			out.println(msg);
			out.flush();
			debugCount++;
		}
	}
	
    public static void main (String args[]) throws IOException {
//    	scan = new MyScanner(new BufferedReader(new FileReader("test.in")));
    	scan = new MyScanner(new BufferedReader(new InputStreamReader(System.in)));
    	out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        Main inst = new Main();
        inst.execute();
        out.close();
    }
    
    class DisjointSet {
		int[] parent;
		int[] sizes;
		
		public DisjointSet(int _size) {
			parent = new int[_size];
			sizes = new int[_size];
			for (int i = 0; i < _size; i++) {
				parent[i] = i;
				sizes[i] = 1;
			}
		}
		
		int find(int x) {
			if (parent[x] == x) return x;
			parent[x] = find(parent[x]);
			return parent[x];
		}
		
		int size(int x) {
			return sizes[find(x)];
		}
		
		boolean union(int x, int y) {
			int rx = find(x);
			int ry = find(y);
			if (rx != ry) {
				if (sizes[rx] < sizes[ry]) {
					int temp = rx;
					rx = ry;
					ry = temp;
				}
				parent[ry] = rx;
				sizes[rx] += sizes[ry];
				return true;
			} else {
				return false;
			}
		}			
	}
    
    class ArrayComparator implements Comparator<int[]> {
		public int compare(int[] o1, int[] o2) {
			return o1[0] - o2[0];
		}
    }
    
    int N, M, timer, check;
    DisjointSet dis;
    int[] tin, low, checks, includes;
    int[][] edges;
    ArrayList<int[]>[] adj;
    
    void dfs(int v, int p) {
    	if (checks[v] == check) {
    		return;
    	}
        checks[v] = check;
        tin[v] = low[v] = timer++;
        for (int[] edge : adj[v]) {
            int to = edge[0];
            if (edge[1] == p) {
            	continue;
            }
            if (checks[to] == check) {
                low[v] = Math.min(low[v], tin[to]);
            } else {
                dfs(to, edge[1]);
                low[v] = Math.min(low[v], low[to]);
                if (low[to] > tin[v]) {
                	includes[edge[1]] = 2;
                }
            }
        }
    }
    
    void execute() {
    	N = scan.nextInt();
    	M = scan.nextInt();
    	timer = 0;
    	check = 0;
    	dis = new DisjointSet(N);
    	tin = new int[N];
    	low = new int[N];
    	checks = new int[N];
    	includes = new int[M];
    	edges = new int[M][4];
    	adj = new ArrayList[N];
    	for (int i = 0; i < N; i++) {
    		tin[i] = low[i] = -1;
    		adj[i] = new ArrayList<int[]>();
    	}
    	for (int i = 0; i < M; i++) {
    		edges[i][1] = scan.nextInt()-1;
    		edges[i][2] = scan.nextInt()-1;
    		edges[i][0] = scan.nextInt();
    		edges[i][3] = i;
    	}
    	Arrays.sort(edges, new ArrayComparator());
    	ArrayList<Integer> relax = new ArrayList<Integer>();
    	ArrayList<Integer> curEdges = new ArrayList<Integer>();
    	for (int i = 0; i < M;) {
    		relax.clear();
    		curEdges.clear();
    		check++;
    		int prev = edges[i][0];
    		while (i < M && edges[i][0] == prev) {
        		if (dis.find(edges[i][1]) != dis.find(edges[i][2])) {
        			int i1 = dis.find(edges[i][1]);
        			int i2 = dis.find(edges[i][2]);
        			if (checks[i1] < check) {
        				adj[i1].clear();
        				checks[i1] = check;
        	    		tin[i1] = low[i1] = -1;
        			}
        			if (checks[i2] < check) {
        				adj[i2].clear();
        				checks[i2] = check;
        	    		tin[i2] = low[i2] = -1;
        			}
        			adj[i1].add(new int[] {i2, edges[i][3]});
        			adj[i2].add(new int[] {i1, edges[i][3]});
            		relax.add(i1);
            		relax.add(i2);
        			includes[edges[i][3]] = 1;
        			curEdges.add(i);
        		}
    			i++;
    		}
    		check++;
    		timer = 0;
    		for (int v : relax) {
    			if (checks[v] != check) {
    				dfs(v, -1);
    			}
    		}
    		for (int e : curEdges) {
    			dis.union(edges[e][1], edges[e][2]);
    		}
    	}
    	for (int i = 0; i < M; i++) {
    		if (includes[i] == 0) {
    			out.println("none");
    		} else if (includes[i] == 1) {
    			out.println("at least one");
    		} else if (includes[i] > 1) {
    			out.println("any");
    		} else {
    			out.println("error");
    		}
    	}
    }
}
