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 class triple{
	      int f;
	      int l;
	      int w;
	      int pos;
	      triple(int k,int i,int j,int p){
	    	  w=k;
	    	  f=i;
	    	  l=j;
	    	  pos=p;
	      }
	}
	static class pair{
		int v;
		int pos;
		pair(int a,int b){
			v=a;
			pos=b;
		}
	}
	static PrintWriter pw = new PrintWriter(System.out);
    static ArrayList<pair>[]E;
    
	public static void main(String[] args) throws Exception {
 
		Scanner sc = new Scanner(System.in);
 
		
        n=sc.nextInt();
        m=sc.nextInt();
        E=new ArrayList[n+2];
        triple[] arr=new triple[m];
        p=new int[n];
        size=new int[n];
        for(int i=0;i<=n;i++)E[i]=new ArrayList<>();
        for(int i=0;i<n;i++)p[i]=i+1;
        for(int i=0;i<m;i++) {
        	int f=sc.nextInt();
        	int l=sc.nextInt();
        	int w=sc.nextInt();
        	arr[i]=new triple(w,f,l,i);
        }
        res=new int[m];
        Sort(arr);
        int i=0;
        int j=0;
        cur=0;
        time=0;
		low=new int[n+1];
		ord=new int[n+1];
		mark=new int[n+1];
        for(i=0;i<m;i=j) {
        	for(j=i;j<m&&arr[j].w==arr[i].w;j++) ;
        	for(int k=i;k<j;k++) {
        		int a=parent(arr[k].f);
        		int b=parent(arr[k].l);
        		if(a!=b)res[arr[k].pos]=1;
        		else res[arr[k].pos]=0;
        		E[a].clear();
        		E[b].clear();
        	}
        	
        	for(int k=i;k<j;k++) {
        		int a=parent(arr[k].f);
        		int b=parent(arr[k].l);
        		if(a!=b) {
        			E[a].add(new pair(b,arr[k].pos));
        			E[b].add(new pair(a,arr[k].pos));
        		}
        	}
        	cur++;
        	time=0;
        	for(int k=i;k<j;k++) {
        		int a=parent(arr[k].f);
        		int b=parent(arr[k].l);
        		if(a!=b) {
        			if(mark[a]!=cur) {
        				dfsh(a,-1);
        			}
        			if(mark[b]!=cur)dfsh(b,-1);
        		}
        	}
        			
            for(int k=i;k<j;k++) {
            	int a=parent(arr[k].f);
        		int b=parent(arr[k].l);
        		if(a!=b) {
        		union(a,b);cur++;}
            }
        }
        for(i=0;i<m;i++) {
        	if(res[i]==1)pw.println("at least one");
        	else if(res[i]==2){
        		pw.println("any");
        	}
        	else pw.println("none");
        }
		pw.close();
	}
	static int[]ord,low,mark,res;
	static int n,m;
	static int time,cur;
	static void dfsh(int u,int pid) {
	  ord[u]=low[u]=time++;
	  mark[u]=cur;
	  for(pair i:E[u]) {
		  if(i.pos==pid)continue;
		  if (mark[i.v] != cur) {
				dfsh(i.v, i.pos);
				low[u] = Math.min(low[u], low[i.v]);
			} else {
				low[u] = Math.min(low[u], ord[i.v]);
		}
	  }
	  if (pid != -1) {
			if (low[u] == ord[u]) {
				res[pid] =2;
			}
	}
	}
	static int[]size;
	static int[]p;
	public static void union(int x,int y) {
		int f=x;
		int l=y;
		if(size[f-1]<size[l-1]) {
			p[f-1]=l;
			size[l-1]+=size[f-1];
		}
		else {
			p[l-1]=f;
			size[f-1]+=size[l-1];
		}
	}
	static int parent(int x) {
		if(p[x-1]==x) {
			return x;
		}
		return p[x-1]=parent(p[x-1]);
	}
public static void conquer(triple[] arr,int b,int m,int e){
	    int len1=m-b+1;
	    int len2=e-m;
	    triple[] l=new triple[len1];
	    triple[] r=new triple[len2];
	    for(int i=0;i<len1;i++){
	        l[i]=arr[b+i];
	    }
	   for(int j=0;j<len2;j++){
	            r[j]=arr[m+1+j];
	   }
	    int i=0,j=0,k=b;
	    while((i<len1)&&(j<len2)){
	        if(r[j].w>=l[i].w){
	            arr[k]=l[i];
	            k++;
	            i++;
	        }
	        else{
	           arr[k]=r[j];
	           k++;
	           j++;
	        }
	    }
	    while(i<len1){
	        arr[k++]=l[i++];
	    }
	    while(j<len2){
	        arr[k++]=r[j++];
	    }
	}
	static int mid;
	public static void sort(triple[] arr,int b,int e){
	    if(b<e){
	        int mid =(e+b)/2;
	        sort(arr,b,mid);
	        sort(arr,mid+1,e);
	        conquer(arr,b,mid,e);
	    }
	}
    public static void Sort(triple[] arr){
        sort(arr,0,arr.length-1);
    }
 
	static class Scanner {
 
		StringTokenizer st;
 
		BufferedReader br;
 
 
 
		public Scanner(InputStream s) {
 
			br = new BufferedReader(new InputStreamReader(s));
 
		}
 
 
 
		public Scanner(String file) throws FileNotFoundException {
 
			br = new BufferedReader(new FileReader(file));
 
		}
 
 
 
		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();
 
		}
 
 
 
	}
 
}