//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

void	sw( Line &a , Line &b )
{
	swap( a.x , b.x );
	swap( a.y , b.y );
	swap( a.w , b.w );
	swap( a.mark , b.mark );
	swap( a.num , b.num );
}

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	static int g ,h , i;
	for (i = 0; i<mm; i++)
	{
		g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
		sw( data[i--] , data[--mm] );
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		static int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	mm = m;
	for (int i = 0; i<mm; i++)
		if ( data[i].mark ) sw( data[i--] , data[--mm] );
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3];
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	int t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	for (int i = 0; i<m; i++)
	{
		if ( data[i].mark ) continue;
		int g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	find_any(1,-1);
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm,temp;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num,id;
	Line *next;
}data[maxn],*ask[maxn];

void	link2(int x , int id )
{
	data[id].next = ask[x];
	ask[x] = &data[id];
}

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father  , int son , int w )
{
	belong[x][0] = son;
	belong[x][1] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x ,  son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	t = 0;
	belong[x][0] = 0;
	belong[x][1] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , ++t, pp->w );
		int min_tree = n+1;
		find_root( pp->to , x , pp->size , num[t] , min_tree );
	}
	static int g ,h , id;
	static Line* tmp;
	for ( Line* pp = ask[x]; pp ; tmp = pp , pp = tmp->next, tmp->next = 0 )
	{
		g = pp->x , h = pp->y , pp->id;
		if ( belong[g][0] == belong[h][0] ){
			link2( num[belong[g][0]] ,  id );
			continue;
		}
		if ( max(belong[g][1],belong[h][1]) == pp->w ) pp->mark = 1;
	}
	t = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		t++;
		solve( num[t] );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	for (int i = 0; i<m; i++){
		data[i].id = i;
		if ( data[i].mark == 0 ) link2( root , i );
	}
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][2],mm,temp;
bool mark[maxn];
struct	Edge{
	int to , w , id,size,root;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num,id;
	Line *next;
}data[maxn],*ask[maxn];

void	link2(int x , int id )
{
	data[id].next = ask[x];
	ask[x] = &data[id];
}

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn*2];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id ,int d)
{
	p[x] = x;
	num[x] = 0;
	Edge *pp;
	for ( pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id ,d+1);
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( pp = mat[1][x]; pp ; pp = pp->next )
	{
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

		link( k , x , y , i);
		link( k , y , x , i);
		if( k == 0 ) p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father  , int son , int w )
{
	belong[x][0] = son;
	belong[x][1] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x ,  son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	t = 0;
	belong[x][0] = 0;
	belong[x][1] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , ++t, pp->w );
		int min_tree = n+1;
		find_root( pp->to , x , pp->size , num[t] , min_tree );
		pp->root = num[t];
	}
	static int g ,h , id;
	static Line* tmp, *pp;
	pp = ask[x];
	while ( pp )
	{
		g = pp->x , h = pp->y ,id = pp->id;
		if ( belong[g][0] == belong[h][0] ){
			pp = pp->next;
			link2( num[belong[g][0]] ,  id );
			continue;
		}
		if ( max(belong[g][1],belong[h][1]) == pp->w ) pp->mark = 1;
		pp = pp->next;
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		solve( pp->root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	find_any(root,-1,1);
	for (int i = 0; i<m; i++){
		data[i].id = i;
		if ( data[i].mark == 0 ) link2( root , i );
	}
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm,temp;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

void	sw(int &x , int &y )
{
	temp = x;
	x = y;
	y = temp;
}
void	sw( Line &a , Line &b )
{
	sw( a.x , b.x );
	sw( a.y , b.y );
	sw( a.w , b.w );
	sw( a.mark , b.mark );
	sw( a.num , b.num );
}

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	static int g ,h , i;
	for (i = 0; i<mm; i++)
	{
		g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
		sw( data[i--] , data[--mm] );
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		static int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	mm = m;
	for (int i = 0; i<mm; i++)
		if ( data[i].mark ) sw( data[i--] , data[--mm] );
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	int t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	for (int i = 0; i<mm; i++)
	{
		int g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
		swap( data[i--] , data[--mm] );
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	mm = m;
	for (int i = 0; i<mm; i++)
		if ( data[i].mark ) swap( data[i--] , data[--mm] );
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm,temp;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num,id;
	Line *next;
}data[maxn],*ask[maxn];

void	link2(int x , int id )
{
	data[id].next = ask[x];
	ask[x] = &data[id];
}

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father  , int son , int w )
{
	belong[x][0] = son;
	belong[x][1] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x ,  son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	t = 0;
	belong[x][0] = 0;
	belong[x][1] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , ++t, pp->w );
		int min_tree = n+1;
		find_root( pp->to , x , pp->size , num[t] , min_tree );
	}
	static int g ,h , id;
	static Line* tmp, *pp;
	pp = ask[x];
	while ( pp )
	{
		g = pp->x , h = pp->y ,id = pp->id;
		if ( belong[g][0] == belong[h][0] ){
			pp = pp->next;
			link2( num[belong[g][0]] ,  id );
			continue;
		}
		if ( max(belong[g][1],belong[h][1]) == pp->w ) pp->mark = 1;
		pp = pp->next;
	}
	t = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		t++;
		solve( num[t] );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	for (int i = 0; i<m; i++){
		data[i].id = i;
		if ( data[i].mark == 0 ) link2( root , i );
	}
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3];
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	int t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	for (int i = 0; i<m; i++)
	{
		if ( data[i].mark ) continue;
		int g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100005
using namespace std;

int n , m, p[maxn], cnt,num[maxn],belong[maxn][3],mm;
bool mark[maxn];
struct	Edge{
	int to , w , id,size;
	Edge *next;
}*mat[2][maxn] , edges[maxn*2];
struct  Line{
	int x , y , w, mark;
	int num;
}data[maxn];

bool cmp1( Line a , Line b ) { return a.w < b.w; }
bool cmp2( Line a , Line b ) { return a.num < b.num; }

struct	Node{
	int l , r , w, h,to;
}tree[maxn];

int	meger(int a , int b )
{
	if ( a == 0 ) return b;
	if ( b == 0 ) return a;
	if ( tree[a].w >= tree[b].w ) swap(a , b );
	tree[a].r = meger( tree[a].r , b );
	if ( tree[tree[a].l].h <= tree[tree[a].r].h ) swap( tree[a].l , tree[a].r );
	tree[a].h = tree[tree[a].l].h + 1;
	return a;
}

int	pop(int a){
	return meger( tree[a].l , tree[a].r );
}
int	find(int x )
{
	if ( p[x] != x ) p[x] = find(p[x]);
	return p[x];
}

void	find_any(int x , int id )
{
	p[x] = x;
	num[x] = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( pp->id == id ) continue;
		find_any( pp->to , pp->id );
		p[pp->to] = x;
		num[x] = meger( num[x] , num[pp->to] );
	}
	for ( Edge *pp = mat[1][x]; pp ; pp = pp->next )
	{
		//printf("%d %d\n" , pp ->to , find(x) );
		if ( find(pp->to) == x )  continue;
		tree[cnt].w = pp->w;
		tree[cnt].l = tree[cnt].r = 0;
		tree[cnt].to = pp->to;
		tree[cnt++].h = 1;
		num[x] = meger( num[x] , cnt - 1 );
	}
	while ( num[x] != 0 && find(tree[num[x]].to) == x ){
		num[x] = pop(num[x]);
	}
//	printf("%d %d------\n" , x , num[x] );
	if ( num[x] != 0 && tree[num[x]].w == data[id].w ) data[id].mark = 1;
	else data[id].mark = 2;
}

void	link(int k , int x , int y , int id ){
	edges[cnt].id = id;
	edges[cnt].w  = data[id].w;
	edges[cnt].to = y;
	edges[cnt].next = mat[k][x];
	mat[k][x] = &edges[cnt++];
}

void	build_mst()
{
	sort ( data , data+m , cmp1 );
	for (int i = 1; i<=n; i++) p[i] = i;
	for (int i = 0; i<m; i++)
	{
		int x = data[i].x , y = data[i].y;
		int k = 0;
		if ( find(x) == find(y) ) k = 1;

//		if ( k == 0 ) printf("%d %d\n"  , x, y );
		link( k , x , y , i);
		link( k , y , x , i);
		p[find(x)] = find(y);
	}
}

int	find_root(int x , int father , int tol , int &root , int &min_tree)
{
	int size = 1, k = 0;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		int w = find_root( pp->to , x , tol , root , min_tree );
		k = max( k , w );
		size += w;
	}
	k = max( k , tol - size );
	if ( k < min_tree ) root = x , min_tree = k;
	return size;
}

int	dfs(int x ,int father ,int root , int son , int w )
{
	belong[x][0] = root;
	belong[x][1] = son;
	belong[x][2] = w;
	int size = 1;
	for ( Edge *pp = mat[0][x]; pp ; pp = pp->next )
	{
		if ( mark[pp->to] || pp->to == father ) continue;
		size += dfs( pp->to , x , root , son , max(w,pp->w) );
	}
	return size;
}

void	solve(int x )
{
	mark[x] = true;
	static int t = 0;
	belong[x][0] = x;
	belong[x][1] = 0;
	belong[x][2] = 0;
	for ( static Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		pp->size = dfs( pp->to , x , x , ++t, pp->w );
	}
	for (static int i = 0; i<mm; i++)
	{
		static int g = data[i].x , h = data[i].y;
		if ( belong[g][0] != x || belong[h][0] != x || belong[g][1] == belong[h][1] ) continue;
		if ( max(belong[g][2],belong[h][2]) == data[i].w ) data[i].mark = 1;
		swap( data[i--] , data[--mm] );
	}
	for ( Edge *pp = mat[0][x]; pp; pp = pp->next )
	{
		if ( mark[pp->to] ) continue;
		static int root, min_tree = n+1;
		find_root( pp->to , x , pp->size , root , min_tree );
		solve( root );
	}
}

int main()
{
	scanf("%d%d" , &n ,&m );
	for (int i = 0; i<m; i++)
	{
		scanf("%d%d%d" , &data[i].x , &data[i].y , &data[i].w );
		data[i].num = i;
	}
	build_mst();
	cnt = 1;
	for (int i = 1; i<=n; i++) p[i] = i;
	find_any(1,-1);
	mm = m;
	for (int i = 0; i<mm; i++)
		if ( data[i].mark ) swap( data[i--] , data[--mm] );
	int root , min_tree = n+1;
	memset( mark , false , sizeof(mark) );
	memset( belong , 0  , sizeof(belong));
	find_root(1 , -1 , n , root , min_tree);
	solve(root);
	sort( data , data + m , cmp2 );
	for (int i = 0; i<m; i++)
	{
//		printf("%d %d\n" , data[i].x , data[i].y );
		if ( data[i].mark == 0 ) printf("none\n");
		else if ( data[i].mark == 1 ) printf("at least one\n");
		else printf("any\n");
	}
	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cstdio>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	scanf("%d", &n);
	scanf("%d", &m);
	for(int i = 0; i < m; i++)
	{
		scanf("%d", &x);
		scanf("%d", &y);
		scanf("%d", &z);
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			for(int j = 0; j < n; j++)
			{
				t[j].clear();
				check[j] = false;
			}
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			for(int j = 0; j < (int)ras.size(); j++)
				if(check[ras[j]] == false)
				{
					dist[ras[j]] = 0;
					DFS(ras[j] , -1);
				}

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			printf("at least one\n");
		else if(cutedge[i] == 1)
			printf("none\n");
		else
			printf("any\n");
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cstdio>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
		ras.push_back(uu);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	cout << x + 1 << " "<< low[x] << " "<< dist[x] << endl;
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
	t[x].clear();
}
int main()
{
	int n, m, x, y, z;
	scanf("%d", &n);
	scanf("%d", &m);
	for(int i = 0; i < m; i++)
	{
		scanf("%d", &x);
		scanf("%d", &y);
		scanf("%d", &z);
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			for(int j = 0; j < (int)ras.size(); j++)
			{
				if(check[ras[j]] == false)
				{
					cout << "ras " << ras[j] + 1 << endl;
					dist[ras[j]] = 0;
					DFS(ras[j] , -1);
				}
				check[ras[j]] = false;
				low[ras[j]] = 0;
			}

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			printf("at least one\n");
		else if(cutedge[i] == 1)
			printf("none\n");
		else
			printf("any\n");
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
int low[MAX_N], dist[MAX_N], parent[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv = find_par(x) , uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		xx = vv;
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			parent[t[x][i].F] = x;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	cin >> n >> m;
	for(int i = 0; i < m; i++)
	{
		cin >> x >> y >> z;
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			for(int j = 0; j < n; j++)
			{
				t[j].clear();
				check[j] = false;
				parent[j] = 0;
				dist[j] = 0;
				low[j] = 0;
			}
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			parent[xx] = xx;
			DFS(xx, -1);
		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			cout <<  "at least one" << endl;
		else if(cutedge[i] == 1)
			cout << "none" << endl;
		else
			cout << "any" << endl;
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cstdio>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	scanf("%d", &n);
	scanf("%d", &m);
	for(int i = 0; i < m; i++)
	{
		scanf("%d", &x);
		scanf("%d", &y);
		scanf("%d", &z);
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			for(int j = 0; j < n; j++)
			{
				t[j].clear();
				check[j] = false;
				dist[j] = 0;
				low[j] = 0;
				xx = 0;
			}
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			for(int j = 0; j < (int)ras.size(); j++)
				if(check[ras[j]] == false)
					DFS(ras[j] , -1);

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			printf("at least one\n");
		else if(cutedge[i] == 1)
			printf("none\n");
		else
			printf("any\n");
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define F first
#define S second
#define pb push_back
#define mp make_pair

const int MAX_N = 1000 * 100 + 10;
vector <pair <int, int> > v[MAX_N], edge2;
int parent[MAX_N], dist[MAX_N], cutedge[MAX_N], low[MAX_N];
pair <int, int> weight[MAX_N], edge[MAX_N];
bool check[MAX_N];

int find_par(int x)
{
	if(parent[x] == x)
		return x;
	return parent[x] = find_par(parent[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		parent[z] = t;
}
void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	//cout << "X "  << x << " "<< check[x]<< endl;
	for(int i = 0; i < (int)v[x].size(); i++)
	{
		//cout << "x " << x + 1 << " "<< v[x][i].F + 1 << " "<< v[x][i].S + 1 << endl;
		if(check[v[x][i].F] == false)
		{
			//cout << "xxx " << x + 1 << " "<< v[x][i].F + 1 << " "<< v[x][i].S + 1 << endl;
			dist[v[x][i].F] = dist[x] + 1;
			//cout << "v[x][i].F " << v[x][i].F << " " << dist[v[x][i].F] << endl;
 			DFS(v[x][i].F , v[x][i].S);
			low[x] = min(low[x] , low[v[x][i].F]);
		}
		else if(v[x][i].S != yal)
			low[x] = min(low[x] , dist[v[x][i].F]);
	}
	//cout << "xx " << x + 1 << " "<<low[x] << " "<< dist[x] << " " << yal << endl;
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	cin >> n >> m;
	for(int i = 0; i < m; i++)
	{
		cin >> x >> y >> z;
		x--; y--;
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		parent[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		int w = weight[i].F;
		//cout << "w " << w << endl;
		vector <pair <int, int> > edge2;
		while(i < m && weight[i].F == w)
		{
			if(find_par(edge[weight[i].S].F) != find_par(edge[weight[i].S].S))
				edge2.pb(weight[i]);
			else
				cutedge[weight[i].S] = 1;
			i++;
		}
		i--;
		//cout << "size " << (int)edge2.size() << endl;
		for(int j = 0; j < (int)edge2.size(); j++)
		{
			//cout << "j" << " "<< edge2[j].F << endl;
			//cout << "par "<< parent[edge[edge2[j].S].F] + 1 << " "<< parent[edge[edge2[j].S].S] + 1 << " "<< edge2[j].S + 1 << endl;
			v[parent[edge[edge2[j].S].F]].pb(mp(parent[edge[edge2[j].S].S] , edge2[j].S));
			v[parent[edge[edge2[j].S].S]].pb(mp(parent[edge[edge2[j].S].F] , edge2[j].S));
		}
		for(int j = 0; j < (int)edge2.size(); j++)
		{
			if(check[parent[edge[edge2[j].S].F]] == false)
			{
				dist[parent[edge[edge2[j].S].F]] = 0;
				DFS(parent[edge[edge2[j].S].F], -1);
			}
		}
		for(int j = 0; j < (int)edge2.size(); j++)
		{
			v[parent[edge[edge2[j].S].F]].clear();
			v[parent[edge[edge2[j].S].S]].clear();
			check[parent[edge[edge2[j].S].F]] = false;
			check[parent[edge[edge2[j].S].S]] = false;

		}
		for(int j = 0; j < (int)edge2.size(); j++)
			merge(edge[edge2[j].S].F , edge[edge2[j].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			cout << "at least one" << endl;
		else if(cutedge[i] == 1)
			cout << "none" << endl;
		else
			cout << "any" << endl;
	}
	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
int low[MAX_N], dist[MAX_N], parent[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[x] = y;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv = find_par(x) , uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		xx = vv;
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			parent[t[x][i].F] = x;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	cin >> n >> m;
	for(int i = 0; i < m; i++)
	{
		cin >> x >> y >> z;
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			for(int j = 0; j < n; j++)
			{
				t[j].clear();
				check[j] = false;
				parent[j] = 0;
				dist[j] = 0;
				low[j] = 0;
			}
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			parent[xx] = xx;
			DFS(xx, -1);
		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			cout <<  "at least one" << endl;
		else if(cutedge[i] == 1)
			cout << "none" << endl;
		else
			cout << "any" << endl;
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cstdio>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	scanf("%d", &n);
	scanf("%d", &m);
	for(int i = 0; i < m; i++)
	{
		scanf("%d", &x);
		scanf("%d", &y);
		scanf("%d", &z);
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			for(int j = 0; j < (int)ras.size(); j++)
			{
				if(check[ras[j]] == false)
				{
					dist[ras[j]] = 0;
					DFS(ras[j] , -1);
				}
				t[ras[j]].clear();
				check[ras[j]] = false;
			}

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			printf("at least one\n");
		else if(cutedge[i] == 1)
			printf("none\n");
		else
			printf("any\n");
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cstdio>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
		ras.push_back(uu);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	//cout << x + 1 << " "<< low[x] << " "<< dist[x] << endl;
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
	t[x].clear();
}
int main()
{
	int n, m, x, y, z;
	scanf("%d", &n);
	scanf("%d", &m);
	for(int i = 0; i < m; i++)
	{
		scanf("%d", &x);
		scanf("%d", &y);
		scanf("%d", &z);
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			for(int j = 0; j < (int)ras.size(); j++)
			{
				if(check[ras[j]] == false)
				{
					//cout << "ras " << ras[j] + 1 << endl;
					dist[ras[j]] = 0;
					DFS(ras[j] , -1);
				}
				check[ras[j]] = false;
				low[ras[j]] = 0;
			}

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			printf("at least one\n");
		else if(cutedge[i] == 1)
			printf("none\n");
		else
			printf("any\n");
	}

	return 0;
}


// in the name of God

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

const int MAX_N = 1000 * 100 + 10, MAX_M = 1000 * 1000 + 10;

#define F first
#define S second
#define mp make_pair
#define pb push_back

vector <pair <int , int> > v[MAX_N], t[MAX_N];
vector <int> ras;
int low[MAX_N], dist[MAX_N], root[MAX_N], cutedge[MAX_N];
pair <int , int> edge[MAX_N], weight[MAX_N];
bool hast[MAX_M], check[MAX_N];

int find_par(int x)
{
	if(root[x] == x)
		return x;
	return root[x] = find_par(root[x]);
}
void merge(int x, int y)
{
	int z = find_par(x) , t = find_par(y);
	if(z != t)
		root[z] = t;
}
int xx;

void merge2(int x , int y, int yal)
{
	//cout << "merge2 " <<  x + 1 << " "<< y + 1 << " "<< yal + 1 << endl;
	int vv, uu;
	vv = find_par(x);
	uu = find_par(y);
	//cout << "vv "  << vv + 1 << " "<< uu + 1 << endl;
	if(vv != uu)
	{
		t[vv].pb(mp(uu , yal));
		t[uu].pb(mp(vv , yal));
		ras.push_back(vv);
	}
	else
		cutedge[yal] = 1;
}

void DFS(int x, int yal)
{
	low[x] = dist[x];
	check[x] = true;
	for(int i = 0; i < (int)t[x].size(); i++)
	{
		if(check[t[x][i].F] == false)
		{
			dist[t[x][i].F] = dist[x] + 1;
			DFS(t[x][i].F, t[x][i].S);
			low[x] = min(low[x] , low[t[x][i].F]);
		}
		else if(t[x][i].S != yal)
			low[x] = min(low[x] , dist[t[x][i].F]);
	}
	if(low[x] >= dist[x] && yal != -1)
		cutedge[yal] = 2;
}
int main()
{
	int n, m, x, y, z;
	cin >> n >> m;
	for(int i = 0; i < m; i++)
	{
		cin >> x >> y >> z;
		x--; y--;
		v[x].pb(mp(y , i));
		v[y].pb(mp(x , i));
		edge[i] = mp(x , y);
		weight[i] = mp(z , i);
	}
	for(int i = 0; i < n; i++)
		root[i] = i;
	sort(weight , weight + m);
	for(int i = 0; i < m; i++)
	{
		//cout << "weight " << weight[i].F << " "<<  edge[weight[i].S].F + 1 << " "<< edge[weight[i].S].S + 1 << endl;
		if(hast[weight[i].F] == false)
		{
			ras.empty();
			for(int j = 0; j < n; j++)
			{
				t[j].clear();
				check[j] = false;
				dist[j] = 0;
				low[j] = 0;
				xx = 0;
			}
			hast[weight[i].F] = true;
			for(int j = i; j < m; j++)
			{
				if(weight[j].F != weight[i].F)
					break;
				//cout << weight[j].F << " " << weight[j].S + 1<< " " << edge[weight[j].S].F + 1 <<" " <<  edge[weight[j].S].S + 1 << endl;
				merge2(edge[weight[j].S].F , edge[weight[j].S].S , weight[j].S);
			}
			//cout << xx + 1 << endl;
			for(int j = 0; j < (int)ras.size(); j++)
				if(check[ras[j]] == false)
					DFS(ras[j] , -1);

		}
		merge(edge[weight[i].S].F , edge[weight[i].S].S);
	}
	for(int i = 0; i < m; i++)
	{
		if(cutedge[i] == 0)
			cout <<  "at least one" << endl;
		else if(cutedge[i] == 1)
			cout << "none" << endl;
		else
			cout << "any" << endl;
	}

	return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef pair<int,int> ii;
struct E{int x,y,z,r;}e[100020];
bool operator<(const E&a,const E&b)
{
    return a.z<b.z;
}
vector<ii>l[100020];
string ans[100020];
int f[100020];
int dfn[100020];
int low[100020];
int cnt,cur;
int v[100020];
int F(int x)
{
    return f[x]!=x?f[x]=F(f[x]):x;
}
void dfs(int x,int y)
{
    dfn[x]=low[x]=cnt++;
    v[x]=cur;
    for(int i=0;i<l[x].size();i++)
    {
        int t=l[x][i].first;
        int id=l[x][i].second;
        if(id==y)
            continue;
        if(v[t]!=cur)
            dfs(t,id),low[x]=min(low[x],low[t]);
        else
            low[x]=min(low[x],dfn[t]);
    }
    if(y!=-1)
    {
        if(low[x]==dfn[x])
        {
            ans[y]="any";
        }
    }
}
int n,m;
int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        scanf("%d %d %d",&e[i].x,&e[i].y,&e[i].z);
        e[i].x--;
        e[i].y--;
        e[i].r=i;
    }
    for(int i=0;i<n;i++)
        f[i]=i;
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;j<m&&e[j].z==e[i].z;j++)
            ;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x==y)
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[x].clear();
            l[y].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;

struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            if (F(a.x) == F(a.y))
                ans[a.r] = "none";
            else
                ans[a.r] = "at least one";
            l[F(a.x)].clear();
            l[F(a.y)].clear();
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                l[x].push_back(make_pair(y, a.r));
                l[y].push_back(make_pair(x, a.r));
            }
        }

        ++cur;

        cnt = 0;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                if (v[x] != cur) {
                    dfs(x, -1);
                }
                if (v[y] != cur) {
                    dfs(y, -1);
                }
            }
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            f[x] = y;
        }
    }

    for (int i = 0; i < m; ++i) {
        puts(ans[i].c_str());
    }
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;

struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            if (F(a.x) == F(a.y))
                ans[a.r] = "none";
            else
                ans[a.r] = "at least one";
            l[F(a.x)].clear();
            l[F(a.y)].clear();
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                l[x].push_back(make_pair(y, a.r));
                l[y].push_back(make_pair(x, a.r));
            }
        }

        ++cur;

        cnt = 0;

        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef pair<int,int> ii;
struct E{int x,y,z,r;}e[100020];
bool operator<(const E&a,const E&b)
{
    return a.z<b.z;
}
vector<ii>l[100020];
string ans[100020];
int f[100020];
int dfn[100020];
int low[100020];
int cnt,cur;
int v[100020];
int F(int x)
{
    return f[x]!=x?f[x]=F(f[x]):x;
}
void dfs(int x,int y)
{
    dfn[x]=low[x]=cnt++;
    v[x]=cur;
    for(vector<ii>::iterator i=l[x].begin();i!=l[x].end();i++)
    {
        int t=i->first;
        int id=i->second;
        if(id==y)
            continue;
        if(v[t]!=cur)
            dfs(t,id),low[x]=min(low[x],low[t]);
        else
            low[x]=min(low[x],dfn[t]);
    }
    if(y!=-1)
    {
        if(low[x]==dfn[x])
        {
            ans[y]="any";
        }
    }
}
int n,m;
int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        scanf("%d %d %d",&e[i].x,&e[i].y,&e[i].z);
        e[i].x--;
        e[i].y--;
        e[i].r=i;
    }
    for(int i=0;i<n;i++)
        f[i]=i;
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;j<m&&e[j].z==e[i].z;j++)
            ;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x==y)
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[x].clear();
            l[y].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<string>
#include<vector>
using namespace std;
typedef pair<int,int> ii;
struct E{int x,y,z,r;}e[100020];
bool operator<(const E&a,const E&b)
{
    return a.z<b.z;
}
vector<ii>l[100020];
string ans[100020];
int f[100020];
int dfn[100020];
int low[100020];
int cnt,cur;
int v[100020];
int F(int x)
{
    return f[x]!=x?f[x]=F(f[x]):x;
}
void dfs(int x,int y)
{
    dfn[x]=low[x]=cnt++;
    v[x]=cur;
    for(int i=0;i<l[x].size();i++)
    {
        int t=l[x][i].first;
        int id=l[x][i].second;
        if(id==y)
            continue;
        if(v[t]!=cur)
            dfs(t,id),low[x]=min(low[x],low[t]);
        else
            low[x]=min(low[x],dfn[t]);
    }
    if(y!=-1)
    {
        if(low[x]==dfn[x])
        {
            ans[y]="any";
        }
    }
}
int n,m;
int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        scanf("%d %d %d",&e[i].x,&e[i].y,&e[i].z);
        e[i].r=i;
    }
    for(int i=0;i<n;i++)
        f[i]=i;
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;j<m&&e[j].z==e[i].z;j++)
            ;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(F(x)==F(y))
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[F(x)].clear();
            l[F(y)].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
using namespace std;

const int MAX_N = 100000 + 10;

int n, m;

struct Edge {
    int a, b, w;
    int id;
    void read() {
        scanf("%d%d%d", &a, &b, &w);
        --a, --b;
    }
    bool operator<(const Edge&e) const {
        return w < e.w;
    }
};

Edge es[MAX_N];

int F[MAX_N];

int fd(int x) {
    return F[x] == x ? x : F[x] = fd(F[x]);
}

string ans[MAX_N];

vector<pair<int, int> > E[MAX_N];

int ord[MAX_N], low[MAX_N];
int mark[MAX_N];
int cur, pt;

void dfs(int u, int pid) {
    ord[u] = low[u] = pt++;
    mark[u] = cur;

    for (vector<pair<int, int> >::iterator e = E[u].begin(); e != E[u].end(); ++e) {
        int t = e->first, id = e->second;
        if (id == pid)
            continue;
        if (mark[t] != cur) {
            dfs(t, id);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], ord[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == ord[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        es[i].read();
        es[i].id = i;
    }
    for (int i = 0; i < n; ++i) {
        F[i] = i;
    }

    sort(es, es + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && es[j].w == es[i].w; ++j)
            ;

        for (int k = i; k < j; ++k) {
            Edge&e = es[k];
            if (fd(e.a) == fd(e.b))
                ans[e.id] = "none";
            else
                ans[e.id] = "at least one";
            E[fd(e.a)].clear();
            E[fd(e.b)].clear();
        }

        for (int k = i; k < j; ++k) {
            Edge&e = es[k];
            int a = fd(e.a), b = fd(e.b);
            if (a != b) {
                E[a].push_back(make_pair(b, e.id));
                E[b].push_back(make_pair(a, e.id));
            }
        }

        ++cur;

        pt = 0;

        for (int k = i; k < j; ++k) {
            Edge&e = es[k];
            int a = fd(e.a), b = fd(e.b);
            if (a != b) {
                if (mark[a] != cur) {
                    dfs(a, -1);
                }
                if (mark[b] != cur) {
                    dfs(b, -1);
                }
            }
        }

        for (int k = i; k < j; ++k) {
            Edge&e = es[k];
            int a = fd(e.a), b = fd(e.b);
            F[a] = b;
        }
    }

    for (int i = 0; i < m; ++i) {
        puts(ans[i].c_str());
    }
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;

struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            if (F(a.x) == F(a.y))
                ans[a.r] = "none";
            else
                ans[a.r] = "at least one";
            l[F(a.x)].clear();
            l[F(a.y)].clear();
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                l[x].push_back(make_pair(y, a.r));
                l[y].push_back(make_pair(x, a.r));
            }
        }

        ++cur;

        cnt = 0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            f[x] = y;
        }
    }

    for (int i = 0; i < m; ++i) {
        puts(ans[i].c_str());
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef pair<int,int> ii;
struct E{int x,y,z,r;}e[100020];
bool operator<(const E&a,const E&b)
{
    return a.z<b.z;
}
vector<ii>l[100020];
string ans[100020];
int f[100020];
int dfn[100020];
int low[100020];
int cnt,cur;
int v[100020];
int F(int x)
{
    return f[x]!=x?f[x]=F(f[x]):x;
}
void dfs(int x,int y)
{
    dfn[x]=low[x]=cnt++;
    v[x]=cur;
    for(vector<ii>::iterator i=l[x].begin();i!=l[x].end();i++)
    {
        int t=i->first;
        int id=i->second;
        if(id==y)
            continue;
        if(v[t]!=cur)
            dfs(t,id),low[x]=min(low[x],low[t]);
        else
            low[x]=min(low[x],dfn[t]);
    }
    if(y!=-1)
    {
        if(low[x]==dfn[x])
        {
            ans[y]="any";
        }
    }
}
int n,m;
int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        scanf("%d %d %d",&e[i].x,&e[i].y,&e[i].z);
        e[i].x--;
        e[i].y--;
        e[i].r=i;
    }
    for(int i=0;i<n;i++)
        f[i]=i;
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;j<m&&e[j].z==e[i].z;j++)
            ;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x==y)
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[x].clear();
            l[y].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur)
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;

struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            if (F(a.x) == F(a.y))
                ans[a.r] = "none";
            else
                ans[a.r] = "at least one";
            l[F(a.x)].clear();
            l[F(a.y)].clear();
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                l[x].push_back(make_pair(y, a.r));
                l[y].push_back(make_pair(x, a.r));
            }
        }

        ++cur;

        cnt = 0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }

    for (int i = 0; i < m; ++i) {
        puts(ans[i].c_str());
    }
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;

struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            if (F(a.x) == F(a.y))
                ans[a.r] = "none";
            else
                ans[a.r] = "at least one";
            l[F(a.x)].clear();
            l[F(a.y)].clear();
        }

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            if (x != y) {
                l[x].push_back(make_pair(y, a.r));
                l[y].push_back(make_pair(x, a.r));
            }
        }

        ++cur;

cnt=0;
for(int k=i;k<j;k++)
{
E&a=e[k];
int x=F(a.x),y=F(a.y);
if(x!=y)
{
if(v[x]!=cur)
{
dfs(x,-1);
}
if(v[y]!=cur)
{
dfs(y,-1);
}
}
}

        for (int k = i; k < j; ++k) {
            E&a = e[k];
            int x = F(a.x), y = F(a.y);
            f[x] = y;
        }
    }

    for (int i = 0; i < m; ++i) {
        puts(ans[i].c_str());
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef pair<int,int> ii;
struct E{int x,y,z,r;}e[100020];
bool operator<(const E&a,const E&b)
{
    return a.z<b.z;
}
vector<ii>l[100020];
string ans[100020];
int f[100020];
int dfn[100020];
int low[100020];
int cnt,cur;
int v[100020];
int F(int x)
{
    return f[x]!=x?f[x]=F(f[x]):x;
}
void dfs(int x,int y)
{
    dfn[x]=low[x]=cnt++;
    v[x]=cur;
    for(int i=0;i<l[x].size();i++)
    {
        int t=l[x][i].first;
        int id=l[x][i].second;
        if(id==y)
            continue;
        if(v[t]!=cur)
            dfs(t,id),low[x]=min(low[x],low[t]);
        else
            low[x]=min(low[x],dfn[t]);
    }
    if(y!=-1)
    {
        if(low[x]==dfn[x])
        {
            ans[y]="any";
        }
    }
}
int n,m;
int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        scanf("%d %d %d",&e[i].x,&e[i].y,&e[i].z);
        e[i].r=i;
    }
    for(int i=0;i<n;i++)
        f[i]=i;
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;j<m&&e[j].z==e[i].z;j++)
            ;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(F(x)==F(y))
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[F(x)].clear();
            l[F(y)].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


/*
 * d.cpp
 *
 *  Created on: 2012-3-6
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
using namespace std;
int n, m;
typedef pair<int,int> ii;
struct E {
    int x, y, z;
    int r;
    void read() {
        scanf("%d%d%d", &x, &y, &z);
        --x, --y;
    }
    bool operator<(const E&a) const {
        return z < a.z;
    }
};

E e[100020];

int f[100020];

int F(int x) {
    return f[x] == x ? x : f[x] = F(f[x]);
}

string ans[100020];

vector<pair<int, int> > l[100020];

int dfn[100020], low[100020];
int v[100020];
int cur, cnt;

void dfs(int u, int pid) {
    dfn[u] = low[u] = cnt++;
    v[u] = cur;

    for (vector<pair<int, int> >::iterator a = l[u].begin(); a != l[u].end(); ++a) {
        int t = a->first, r = a->second;
        if (r == pid)
            continue;
        if (v[t] != cur) {
            dfs(t, r);
            low[u] = min(low[u], low[t]);
        } else {
            low[u] = min(low[u], dfn[t]);
        }
    }

    if (pid != -1) {
        if (low[u] == dfn[u]) {
            ans[pid] = "any";
        }
    }
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        e[i].read();
        e[i].r = i;
    }
    for (int i = 0; i < n; ++i) {
        f[i] = i;
    }

    sort(e, e + m);

    for (int i = 0, j; i < m; i = j) {
        for (j = i; j < m && e[j].z == e[i].z; ++j)
            ;

        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x==y)
                ans[a.r]="none";
            else
                ans[a.r]="at least one";
            l[x].clear();
            l[y].clear();
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                l[x].push_back(ii(y,a.r));
                l[y].push_back(ii(x,a.r));
            }
        }
        cur++;
        cnt=0;
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            if(x!=y)
            {
                if(v[x]!=cur)
                    dfs(x,-1);
                if(v[y]!=cur);
                    dfs(y,-1);
            }
        }
        for(int k=i;k<j;k++)
        {
            E &a=e[k];
            int x=F(a.x),y=F(a.y);
            f[x]=y;
        }
    }
    for(int i=0;i<m;i++)
        puts(ans[i].c_str());
    return 0;
}


#include<vector>
#include<algorithm>
#include<utility>
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<time.h>
#include<bitset>
#include<map>
#include<queue>
#include<stack>
#include<set>
#define fr(i,n) for(int i=0;i<n;i++)
#define fo(i,n) for(int i=1;i<=n;i++)
#define rf(i,n) for(int i=n-1;i>=0;i--)
#define of(i,n) for(int i=n;i>0;i--)
#define scan(x) scanf("%d",&x);
#define scans(x) scanf("%s",&x);
#define scand(x) scanf("%lf",x);
#define print(x) printf("%d ",x);
const int inf=0x3fffffff;
const double pi=acos(-1.);
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef set<int> si;
typedef vector<int> vi;
int n;
int a[120];
int f[10020];
int sum;
int main()
{
	scan(n);
	memset(f,0x3f,sizeof(f));
	f[0]=0;
	fr(i,n)
	{
		scan(a[i]);
		sum+=a[i];
		for(int j=10000;j>=a[i];j--)
			f[j]=min(f[j],f[j-a[i]]+1);
	}
	int i;
	int ans=inf;
	for(i=(sum+2)/2;i<=sum;i++)
		ans=min(ans,f[i]);
	printf("%d",ans);
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) {mk[u] = true, tmp.push_back(u);}
				if(!mk[v]) {mk[v] = true, tmp.push_back(v);}
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			mh[tmp[i]] = h[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			Union(es[E[i].second] , ee[E[i].second]);
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	fill_n(par , MN , -1);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			edges[tmp[i]].clear();
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		fill_n(mk , MN, false);
		fill_n(h , MN, 0);
		fill_n(mh , MN , 0);
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) {mk[u] = true, tmp.push_back(u);}
				if(!mk[v]) {mk[v] = true, tmp.push_back(v);}
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		fill_n(mk , MN, false);
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=l;i<=r;++i){
			Union(es[E[i].second] , ee[E[i].second]);
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}