#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

#define lli long long int
#define MAX INT_MAX
#define PI acos(-1)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>b;i--)
#define buyuk(a,b) (a<b)? b:a
#define kucuk(a,b) (a<b)? a:b
#define ort(a,b) (a+b)/2
#define carp(a,b) (a)*(b)
int main () {
	int i,j,l,t=0,m,a[100];
	scanf("%d",&t);
	for(i=0;i<t;i++)
		scanf("%d",&a[i]);

	for(i=0;i<t;i++){
		for(j=0;j<t;j++)
			for(m=0;m<t;m++)
			if(a[i]+a[j]==a[m] && a[j]!=a[i]){
				printf("%d %d %d",m+1,j+1,i+1);
					return 0;
			}
	}
	printf("-1");
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

#define lli long long int
#define MAX INT_MAX
#define PI acos(-1)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>b;i--)
#define buyuk(a,b) (a<b)? b:a
#define kucuk(a,b) (a<b)? a:b
#define ort(a,b) (a+b)/2
#define carp(a,b) (a)*(b)
int main () {
	int i,j,l,t=0,m,a[100];
	scanf("%d",&t);
	for(i=0;i<t;i++)
		scanf("%d",&a[i]);

	for(i=0;i<t;i++){
		for(j=0;j<t;j++)
			for(m=0;m<t;m++)
			if(a[i]+a[j]==a[m] && a[j]!=a[i]){
				printf("%d %d %d",a[m],a[j],a[i]);
					return 0;
			}
	}
	printf("-1");
}


#include<stdio.h>
#include<stdlib.h>
int *merge(int length[],int l,int r)
{
	int i,j,k,mid;
	mid=(l+r)/2,i=l,k=0;
	j=mid+1;
	int *temp=(int *)malloc(sizeof(int)*(r-l+1));
	while(i<=mid && j<=r)
	{
		if(length[i]<=length[j])
		{
			temp[k]=length[i];
			k++;
			i++;
		}
		else
		{
			temp[k]=length[j];
			k++;
			j++;
		}
	}
	while(i<=mid)
	{
		temp[k]=length[i];
		k++;
		i++;
	}
	while(j<=r)
	{
		temp[k]=length[j];
		k++;
		j++;
	}
	k=0;
	for(i=l;i<=r;i++)
	{
		length[i]=temp[k];
		k++;
	}
	free(temp);
}
int *merge_sort(int length[],int fi,int la)
{
	if(fi>=la)
		return;
	int mid=(fi+la)/2;
	merge_sort(length,fi,mid);
	merge_sort(length,mid+1,la);
	merge(length,fi,la);
}
int main()
{
	int n,i,l,r,flag=0;
	scanf("%d",&n);
	int *length=(int *)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&length[i]);
	}
	merge_sort(length,0,n-1);
/*	for(i=0;i<n;i++)
	{
		printf("%d ",length[i]);
	}
	printf("\n");*/
	l=0;r=n-1;
	for(i=2;i<n;i++)
	{
		while(l<r)
		{
			if(length[l]+length[r]==length[i])
			{
				flag=1;
				break;
			}
			else if(length[l]+length[r]<length[i])
				l++;
			else if(length[l]+length[r]>length[i])
				r--;
		}
		if(flag==1)
			break;
	}
	if(flag==1)
		printf("%d %d %d\n",i+1,l+1,r+1);
	else
		printf("-1\n");
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
int *merge(int length[],int index[],int l,int r)
{
	int i,j,k,mid;
	mid=(l+r)/2,i=l,k=0;
	j=mid+1;
	int *temp=(int *)malloc(sizeof(int)*(r-l+1));
	int *temp_index=(int *)malloc(sizeof(int)*(r-l+1));
	while(i<=mid && j<=r)
	{
		if(length[i]<=length[j])
		{
			temp[k]=length[i];
			temp_index[k]=index[i];
			k++;
			i++;
		}
		else
		{
			temp[k]=length[j];
			temp_index[k]=index[j];
			k++;
			j++;
		}
	}
	while(i<=mid)
	{
		temp[k]=length[i];
		temp_index[k]=index[i];
		k++;
		i++;
	}
	while(j<=r)
	{
		temp[k]=length[j];
		temp_index[k]=index[j];
		k++;
		j++;
	}
	k=0;
	for(i=l;i<=r;i++)
	{
		length[i]=temp[k];
		index[i]=temp_index[k];
		k++;
	}
	free(temp);
	free(temp_index);
}
int *merge_sort(int length[],int index[],int fi,int la)
{
	if(fi>=la)
		return;
	int mid=(fi+la)/2;
	merge_sort(length,index,fi,mid);
	merge_sort(length,index,mid+1,la);
	merge(length,index,fi,la);
}
int main()
{
	int n,i,l,r,flag=0;
	scanf("%d",&n);
	int *length=(int *)malloc(sizeof(int)*n);
	int *index=(int *)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&length[i]);
		index[i]=i;
	}
	merge_sort(length,index,0,n-1);
/*	for(i=0;i<n;i++)
	{
		printf("%d %d ",length[i],index[i]);
	}
	printf("\n");*/
	l=0;r=n-1;
	for(i=2;i<n;i++)
	{
		while(l<r)
		{
			if(length[l]+length[r]==length[i])
			{
				flag=1;
				break;
			}
			else if(length[l]+length[r]<length[i])
				l++;
			else if(length[l]+length[r]>length[i])
				r--;
		}
		if(flag==1)
			break;
	}
	if(flag==1)
		printf("%d %d %d\n",index[i]+1,index[l]+1,index[r]+1);
	else
		printf("-1\n");
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
int *merge(int length[],int index[],int l,int r)
{
	int i,j,k,mid;
	mid=(l+r)/2,i=l,k=0;
	j=mid+1;
	int *temp=(int *)malloc(sizeof(int)*(r-l+1));
	int *temp_index=(int *)malloc(sizeof(int)*(r-l+1));
	while(i<=mid && j<=r)
	{
		if(length[i]<=length[j])
		{
			temp[k]=length[i];
			temp_index[k]=index[i];
			k++;
			i++;
		}
		else
		{
			temp[k]=length[j];
			temp_index[k]=index[j];
			k++;
			j++;
		}
	}
	while(i<=mid)
	{
		temp[k]=length[i];
		temp_index[k]=index[i];
		k++;
		i++;
	}
	while(j<=r)
	{
		temp[k]=length[j];
		temp_index[k]=index[j];
		k++;
		j++;
	}
	k=0;
	for(i=l;i<=r;i++)
	{
		length[i]=temp[k];
		index[i]=temp_index[k];
		k++;
	}
	free(temp);
	free(temp_index);
}
int *merge_sort(int length[],int index[],int fi,int la)
{
	if(fi>=la)
		return;
	int mid=(fi+la)/2;
	merge_sort(length,index,fi,mid);
	merge_sort(length,index,mid+1,la);
	merge(length,index,fi,la);
}
int main()
{
	int n,i,l,r,flag=0;
	scanf("%d",&n);
	int *length=(int *)malloc(sizeof(int)*n);
	int *index=(int *)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&length[i]);
		index[i]=i;
	}
	merge_sort(length,index,0,n-1);
/*	for(i=0;i<n;i++)
	{
		printf("%d %d ",length[i],index[i]);
	}
	printf("\n");*/
	for(i=0;i<n;i++)
	{
		l=0,r=n-1;
		while(l<r)
		{
			if(length[l]+length[r]==length[i])
			{
				flag=1;
				break;
			}
			else if(length[l]+length[r]<length[i])
				l++;
			else if(length[l]+length[r]>length[i])
				r--;
		}
		if(flag==1)
			break;
	}
	if(flag==1)
		printf("%d %d %d\n",index[i]+1,index[l]+1,index[r]+1);
	else
		printf("-1\n");
	return 0;
}


#include<stdio.h>
int main()
{
int n,m,i,j,k,d=0,p,x,y,z;
scanf("%d",&n);
int a[n];
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<n;k++)
while(i!=j && i!=k && j!=k)
if(a[i]+a[j]==a[k])
{printf("%d %d %d",k+1,j+1,i+1);
return 0;}
else
break;
}
}
printf("-1");
return 0;
}


#include<stdio.h>
int main()
{
int n,m,i,j,k,d=0,p,x,y,z;
scanf("%d",&n);
int a[n];
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<n;k++)
while(i!=j && i!=k && j!=k)
if(a[i]+a[j]==a[k])
{printf("%d %d %d",a[k],a[j],a[i]);
return 0;}
else
break;
}
}
printf("-1");
return 0;
}


#include<stdio.h>
typedef int type;
type cmd(void* a,void* b)
{
return(*(type*)a-*(type*)b);

}

int main()
{
int i,j,k,a[100],n;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
qsort(a,n,sizeof(type),cmd);
for(i=0;i<n-2;i++)
     for(j=i+1;j<n-1;j++)
            for(k=j;k<n;k++)
            {
                if(a[i]+a[j]==a[k])
                    {       printf("%d %d %d",a[k],a[j],a[i]);
                            return 0;
                    }
            }
printf("-1");
return 0;
}


#include<stdio.h>
typedef int type;
type cmd(void* a,void* b)
{
return(*(type*)a-*(type*)b);

}

int main()
{
int i,j,k,a[100][2],n;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d",&a[i][0]);
a[i][1]=i+1;
}

qsort(a,n,sizeof(type),cmd);

for(i=0;i<n-2;i++)
     for(j=i+1;j<n-1;j++)
            for(k=j;k<n;k++)
            {
                if(a[i][0]+a[j][0]==a[k][0])
                    {       printf("%d %d %d",a[k][1],a[j][1],a[i][1]);
                            return 0;
                    }
            }
printf("-1");
return 0;
}


#include<stdio.h>
typedef int type;
type cmd(void* a,void* b)
{
return(*(type*)a-*(type*)b);

}

int main()
{
int i,j,k,a[100],n;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
qsort(a,n,sizeof(type),cmd);
for(i=0;i<n;i++)
    printf("%d\n",a[i]);
for(i=0;i<n-2;i++)
     for(j=i+1;j<n-1;j++)
            for(k=j;k<n;k++)
            {
                if(a[i]+a[j]==a[k])
                    {       printf("%d %d %d",a[k],a[j],a[i]);
                            return 0;
                    }
            }
printf("-1");
return 0;
}


#include<stdio.h>
typedef int type;
type cmd(void* a,void* b)
{
return(*(type*)a-*(type*)b);

}

int main()
{
int i,j,k,a[100],n;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
qsort(a,n,sizeof(type),cmd);
for(i=0;i<n;i++)
    printf("%d\n",a[i]);
for(i=0;i<n-2;i++)
     for(j=i+1;j<n-1;j++)
            for(k=j;k<n;k++)
            {
                if(a[i]+a[j]==a[k])
                    {       printf("%d %d %d",a[i],a[j],a[k]);
                            return 0;
                    }
            }
printf("-1");
return 0;
}


#include<stdio.h>
typedef int type;
type cmd(void* a,void* b)
{
return(*(type*)a-*(type*)b);

}

int main()
{
int i,j,k,a[100][2],n;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d",&a[i][0]);
a[i][1]=i+1;
}

qsort(a,n,2*sizeof(type),cmd);

for(i=0;i<n-2;i++)
     for(j=i+1;j<n-1;j++)
            for(k=j;k<n;k++)
            {
                if(a[i][0]+a[j][0]==a[k][0])
                    {       printf("%d %d %d",a[k][1],a[j][1],a[i][1]);
                            return 0;
                    }
            }
printf("-1");
return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char const *argv[])
{
	int i, j, k;
	int n;
	int *input;

	scanf("%d", &n);
	input = (int*)calloc(n, sizeof(int));

	for (i = 0; i < n; ++i)
	{
		scanf("%d", &input[i]);
	}

	for (i = 0; i < n - 2; ++i)
	{
		for (j = 1; j < n - 1; ++j)
		{
			for (k = 2; k < n; ++k)
			{
				if (input[i] == input[j] + input[k] || input[j] == input[i] + input[k] || input[k] == input[i] + input[j])
				{
					printf("%d %d %d", i+1, j+1, k+1);
					return 0;
				}
			}
		}
	}
	printf("-1");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char const *argv[])
{
	int i, j, k;
	int n;
	int *input;

	scanf("%d", &n);
	input = (int*)calloc(n, sizeof(int));

	for (i = 0; i < n; ++i)
	{
		scanf("%d", &input[i]);
	}

	for (i = 0; i < n; ++i)
	{
		for (j = 0; j < n; ++j)
		{
			for (k = 1; k < n; ++k)
			{
				if (input[i] == input[j] + input[k] && i!=j && j!=k )
				{
					printf("%d %d %d", i + 1, j + 1, k + 1);
					return 0;
				}
			}
		}
	}
	printf("-1");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char const *argv[])
{
	int i, j, k;
	int n;
	int *input;

	scanf("%d", &n);
	input = (int*)calloc(n, sizeof(int));

	for (i = 0; i < n; ++i)
	{
		scanf("%d", &input[i]);
	}

	for (i = 0; i < n; ++i)
	{
		for (j = 0; j < n; ++j)
		{
			for (k = 1; k < n; ++k)
			{
				if (input[i] == input[j] + input[k])
				{
					printf("%d %d %d", i + 1, j + 1, k + 1);
					return 0;
				}
			}
		}
	}
	printf("-1");
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

#define MAXN 100005
#define MAXM 200010

struct Edge
{
    int u, v, c, id;
}edge[MAXM];

int n, m, num;
int fath[MAXN];
int u[MAXM], v[MAXM], c[MAXM];
int sum1[1000005], sum2[1000005];
bool flag[MAXN];

void AddEdge(int u, int v, int c, int id)
{
    edge[num].u = u;
    edge[num].v = v;
    edge[num].c = c;
    edge[num].id = id;
    num++;
}

bool operator < (const Edge &a, const Edge &b)
{
    return a.c < b.c;
}

int getfather(int v)
{
    if (fath[v] == v)
        return v;
    else
    {
        fath[v] = getfather(fath[v]);
        return fath[v];
    }
}

void kruskal()
{
    for(int i = 0; i < n; i++)
        fath[i] = i;
    int cnt = 0;
    for(int i = 0; i < m && cnt < n - 1; i++)
    {
        if (i == 0 || edge[i].c != edge[i - 1].c)
        {
            int j = i;
            while (j < m && edge[i].c == edge[j].c) j++;
            for(int k = i; k < j; k++)
            {
                int x = getfather(edge[k].u), y = getfather(edge[k].v);
                fath[edge[k].u] = x; fath[edge[k].v] = y;
                if (x == y) flag[edge[k].id] = 1;
            }
        }
        int x = getfather(edge[i].u), y = getfather(edge[i].v);
        fath[edge[i].u] = x; fath[edge[i].v] = y;
        if (x == y)
            continue;
        fath[x] = y;
        cnt++;
        sum2[edge[i].c]++;
    }
}

int main()
{
    cin >> n >> m;
    for(int i = 0; i < m; i++)
    {
        cin >> u[i] >> v[i] >> c[i];
        u[i]--; v[i]--;
        AddEdge(u[i], v[i], c[i], i);
    }
    sort(edge, edge + m);
    kruskal();
    for(int i = 0; i < m; i++) if (!flag[i]) sum1[c[i]]++;
    for(int i = 0; i < m; i++)
    {
        if (sum2[c[i]] == 0 || flag[i]) cout << "none" << endl;
        else if (sum2[c[i]] == sum1[c[i]]) cout << "any" << endl;
        else cout << "at least one" << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

#define MAXN 100005
#define MAXM 200010

struct Edge
{
    int u, v, c;
}edge[MAXM];

int n, m, num;
int fath[MAXN];
int u[MAXM], v[MAXM], c[MAXM];
int sum1[1000005], sum2[1000005];

void AddEdge(int u, int v, int c)
{
    edge[num].u = u;
    edge[num].v = v;
    edge[num].c = c;
    num++;
}

bool operator < (const Edge &a, const Edge &b)
{
    return a.c < b.c;
}

int getfather(int v)
{
    if (fath[v] == v)
        return v;
    else
    {
        fath[v] = getfather(fath[v]);
        return fath[v];
    }
}

void kruskal()
{
    for(int i = 0; i < n; i++)
        fath[i] = i;
    int cnt = 0;
    for(int i = 0; i < m && cnt < n - 1; i++)
    {
        int x = getfather(edge[i].u), y = getfather(edge[i].v);
        fath[edge[i].u] = x; fath[edge[i].v] = y;
        if (x == y)
            continue;
        fath[x] = y;
        cnt++;
        sum2[edge[i].c]++;
    }
}

int main()
{
    cin >> n >> m;
    for(int i = 0; i < m; i++)
    {
        cin >> u[i] >> v[i] >> c[i];
        u[i]--; v[i]--;
        AddEdge(u[i], v[i], c[i]);
        sum1[c[i]]++;
    }
    sort(edge, edge + m);
    kruskal();
    for(int i = 0; i < m; i++)
    {
        if (sum2[c[i]] == 0) cout << "none" << endl;
        else if (sum2[c[i]] == sum1[c[i]]) cout << "any" << endl;
        else cout << "at least one" << endl;
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define MAXN 100005
#define MAXM 200010

struct Edge
{
    int u, v, c, id;
}edge[MAXM];

int n, m, num, T;
int u[MAXM], v[MAXM], c[MAXM];
int fath[MAXN], low[MAXN], visit[MAXN], pre[MAXN];
int flag[MAXM];
vector< pair<int, int> > adj[MAXN];
int sum[1000005];

void AddEdge(int u, int v, int c, int id)
{
    edge[num].u = u;
    edge[num].v = v;
    edge[num].c = c;
    edge[num].id = id;
    num++;
}

bool operator < (const Edge &a, const Edge &b)
{
    return a.c < b.c;
}

int getfather(int v)
{
    if (fath[v] == v)
        return v;
    else
    {
        fath[v] = getfather(fath[v]);
        return fath[v];
    }
}

void dfs(int cur, int from)
{
    visit[cur] = low[cur] = ++T;
    for(int i = 0; i < adj[cur].size(); i++)
    {
        int to = adj[cur][i].first;
        if (to == from) continue;
        if (!visit[to])
        {
            pre[to] = adj[cur][i].second;
            dfs(to, cur);
        }
        if (low[to] < low[cur]) low[cur] = low[to];
    }
}
void kruskal()
{
    for(int i = 0; i < n; i++)
        fath[i] = i;
    int cnt = 0;
    for(int i = 0; i < m && cnt < n - 1; i++)
    {
        if (i == 0 || edge[i].c != edge[i - 1].c)
        {
            vector<int> v;
            vector< pair< pair<int, int>, int> > s;
            int j = i;
            while (j < m && edge[i].c == edge[j].c) j++;
            for(int k = i; k < j; k++)
            {
                int x = getfather(edge[k].u), y = getfather(edge[k].v);
                fath[edge[k].u] = x; fath[edge[k].v] = y;
                if (x == y) flag[edge[k].id] = 1;
                else
                {
                    if (x > y) {int t = x; x = y; y = t;}
                    s.push_back(make_pair(make_pair(x, y), edge[k].id));
                    adj[x].clear(); adj[y].clear();
                }
            }
            sort(s.begin(), s.end());
            for(int k = 0; k < s.size();)
            {
                int l = k; while (l < s.size() && s[k].first == s[l].first) l++;
                if (l - k > 1)
                {
                    int t = l - 1;
                    while (t >= k)
                    {
                        flag[s[t].second] = 3;
                        t--;
                    }
                }
                else
                {
                    int x = s[k].first.first, y = s[k].first.second;
                    visit[x] = visit[y] = 0; pre[x] = pre[y] = -1;
                    v.push_back(x);
                    v.push_back(y);
                    adj[x].push_back(make_pair(y, s[k].second));
                    adj[y].push_back(make_pair(x, s[k].second));
                }
                k = l;
            }
            T = 0;
            for(int k = 0; k < v.size(); k++)
                if (adj[v[k]].size() > 0 && !visit[v[k]]) dfs(v[k], -1);
            for(int k = 0; k < v.size(); k++)
                if (pre[v[k]] != -1 && visit[v[k]] == low[v[k]] && !flag[pre[v[k]]])
                    flag[pre[v[k]]] = 2;
        }
        int x = getfather(edge[i].u), y = getfather(edge[i].v);
        fath[edge[i].u] = x; fath[edge[i].v] = y;
        if (x == y)
            continue;
        fath[x] = y;
        sum[edge[i].c]++;
        cnt++;
    }
}

int main()
{
    cin >> n >> m;
    for(int i = 0; i < m; i++)
    {
        cin >> u[i] >> v[i] >> c[i];
        u[i]--; v[i]--;
        AddEdge(u[i], v[i], c[i], i);
    }
    sort(edge, edge + m);
    kruskal();
    for(int i = 0; i < m; i++)
    {
        if (flag[i] == 1 || sum[c[i]] == 0) cout << "none" << endl;
        else if (flag[i] == 2) cout << "any" << endl;
        else cout << "at least one" << endl;
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define MAXN 100005
#define MAXM 200010

struct Edge
{
    int u, v, c, id;
}edge[MAXM];

int n, m, num, T;
int u[MAXM], v[MAXM], c[MAXM];
int fath[MAXN], low[MAXN], visit[MAXN], pre[MAXN];
int flag[MAXM];
vector< pair<int, int> > adj[MAXN];
int sum[1000005];

void AddEdge(int u, int v, int c, int id)
{
    edge[num].u = u;
    edge[num].v = v;
    edge[num].c = c;
    edge[num].id = id;
    num++;
}

bool operator < (const Edge &a, const Edge &b)
{
    return a.c < b.c;
}

int getfather(int v)
{
    if (fath[v] == v)
        return v;
    else
    {
        fath[v] = getfather(fath[v]);
        return fath[v];
    }
}

void dfs(int cur, int from)
{
    visit[cur] = low[cur] = ++T;
    for(int i = 0; i < adj[cur].size(); i++)
    {
        int to = adj[cur][i].first;
        if (to == from) continue;
        if (!visit[to])
        {
            pre[to] = adj[cur][i].second;
            dfs(to, cur);
        }
        if (low[to] < low[cur]) low[cur] = low[to];
    }
}
void kruskal()
{
    for(int i = 0; i < n; i++)
        fath[i] = i;
    int cnt = 0;
    for(int i = 0; i < m && cnt < n - 1; i++)
    {
        if (i == 0 || edge[i].c != edge[i - 1].c)
        {
            vector<int> v;
            int j = i;
            while (j < m && edge[i].c == edge[j].c) j++;
            for(int k = 0; k < n; k++) adj[k].clear();
            for(int k = i; k < j; k++)
            {
                int x = getfather(edge[k].u), y = getfather(edge[k].v);
                fath[edge[k].u] = x; fath[edge[k].v] = y;
                if (x == y) flag[edge[k].id] = 1;
                else
                {
                    bool check = 0;
                    for(int l = 0; l < adj[x].size(); l++) if (adj[x][l].first == y)
                    {
                        check = 1;
                        flag[adj[x][l].second] = 3;
                        break;
                    }
                    if (!check)
                    {
                        v.push_back(x); v.push_back(y);
                        visit[x] = visit[y] = 0; pre[x] = pre[y] = -1;
                        adj[x].push_back(make_pair(y, edge[k].id));
                        adj[y].push_back(make_pair(x, edge[k].id));
                    }
                    else flag[edge[k].id] = 3;
                }
            }
            T = 0;
            for(int k = 0; k < v.size(); k++)
                if (adj[v[k]].size() > 0 && !visit[v[k]]) dfs(v[k], -1);
            for(int k = 0; k < v.size(); k++)
                if (pre[v[k]] != -1 && visit[v[k]] == low[v[k]] && !flag[pre[v[k]]])
                    flag[pre[v[k]]] = 2;
        }
        int x = getfather(edge[i].u), y = getfather(edge[i].v);
        fath[edge[i].u] = x; fath[edge[i].v] = y;
        if (x == y)
            continue;
        fath[x] = y;
        sum[edge[i].c]++;
        cnt++;
    }
}

int main()
{
    cin >> n >> m;
    for(int i = 0; i < m; i++)
    {
        cin >> u[i] >> v[i] >> c[i];
        u[i]--; v[i]--;
        AddEdge(u[i], v[i], c[i], i);
    }
    sort(edge, edge + m);
    kruskal();
    for(int i = 0; i < m; i++)
    {
        if (flag[i] == 1 || sum[c[i]] == 0) cout << "none" << endl;
        else if (flag[i] == 2) cout << "any" << endl;
        else cout << "at least one" << endl;
    }

    return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;

const int Maxv=100010;
int n,m;
int bo[Maxv],stk[Maxv],tot;
int res[Maxv],head[Maxv],etot,low[Maxv],dfn[Maxv],vtime;
bool vis[Maxv];
struct P
{
    int id,u,v,cost;
}p[Maxv];
struct Edge
{
    int u,v,next,id,to;
    bool evis;
}edge[Maxv*2];

bool cmp( P a, P b)
{
    return a.cost<b.cost;
}

int find(int u)
{
    return bo[u]=(bo[u]==u?u:find(bo[u]));
}

bool Union(int u,int v)
{
    u=find(u);
    v=find(v);
    if(u==v)
    return false;
    bo[v]=u;
    return true;
}

void init_edge()
{
    etot=vtime=0;
    memset(head,-1,sizeof(head));
}

void add_edge(int u,int v,int id)
{
    edge[etot].to=v;
    edge[etot].next=head[u];
    edge[etot].id=id;
    edge[etot].evis=false;
    head[u]=etot++;
}

void tjdfs(int u)
{
    vis[u]=true;
    dfn[u]=low[u]=vtime++;
    for(int i=head[u];i!=-1;i=edge[i].next)
    {
        if(!edge[i].evis)
        {
            edge[i].evis=edge[i^1].evis=true;
            int v=edge[i].to;
            if(!vis[v])
            {
                tjdfs(v);
                low[u]=min(low[u],low[v]);
                if(low[v]>dfn[u])
                {
                    res[edge[i].id]=2;
                    //cout<<edge[i].id<<" dsf"<<endl;
                }
            }
            else
                low[u]=min(low[u],dfn[v]);
        }
    }
}

int main()
{
    int i,j;
    cin>>n>>m;
    for(i=1;i<=n;i++)
    bo[i]=i;
    for(i=0;i<m;i++)
    {
        scanf("%d%d%d",&p[i].u,&p[i].v,&p[i].cost);
        p[i].id=i;
    }
    sort(p,p+m,cmp);
    p[m].u=p[m].v=0;p[m].id=m;p[m].cost=-11;
    int last=-1;
    for(i=0;i<m;i++)
    {
        //cout<<p[i].u<<" "<<p[i].v<<endl;
        if(p[i].cost!=last)
        {
            etot=vtime=0;int tp=-1;
            if(tot) tp=find(p[0].u);
            for(j=0;j<tot;j++)
            {
                int u=p[stk[j]].u;int v=p[stk[j]].v;
                u=find(u);v=find(v);
                head[u]=head[v]=-1;vis[u]=vis[v]=false;
            }
            for(j=0;j<tot;j++)
            {
                int u=p[stk[j]].u;int v=p[stk[j]].v;
                u=find(u);v=find(v);
                if(res[p[stk[j]].id])
                {
                    add_edge(u,v,p[stk[j]].id);
                    add_edge(v,u,p[stk[j]].id);
                    // cout<<u<<" "<<v<<endl;
                }
            }
            //cout<<endl;
            while(tot)
            {
                tot--;
                int u=p[stk[tot]].u;int v=p[stk[tot]].v;
                Union(u,v);
            }
            if(tp!=-1)
            tjdfs(tp);
        }
        if(find(p[i].u)==find(p[i].v))
        res[p[i].id]=0;
        else
        res[p[i].id]=1;
        last=p[i].cost;
        stk[tot++]=i;
    }
    for(i=0;i<m;i++)
    if(res[i]==1)
    puts("at least one");
    else if(res[i]==2)
    puts("any");
    else
    puts("none");
}

/*pqmfaffeocigmebphqhbaaqfqejsrrjfgbcsttcfcdlohebgai*/


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
const int Maxv=100110;
int n,m;
int bo[Maxv],stk[Maxv],tot;
int res[Maxv],head[Maxv],etot,low[Maxv],dfn[Maxv],vtime;
bool vis[Maxv];
struct P
{
int id,u,v,cost;
}p[Maxv];
struct Edge
{
int u,v,next,id,to;
bool evis;
}edge[Maxv*2];
bool cmp( P a, P b)
{
return a.cost<b.cost;
}
int find(int u)
{
return bo[u]=(bo[u]==u?u:find(bo[u]));
}
bool Union(int u,int v)
{
u=find(u);
v=find(v);
if(u==v)
return false;
bo[v]=u;
return true;
}
void add_edge(int u,int v,int id)
{
edge[etot].to=v;
edge[etot].next=head[u];
edge[etot].id=id;
edge[etot].evis=false;
head[u]=etot++;
}
void tjdfs(int u)
{
vis[u]=true;
dfn[u]=low[u]=vtime++;
for(int i=head[u];i!=-1;i=edge[i].next)
{
if(!edge[i].evis)
{
edge[i].evis=edge[i^1].evis=true;
int v=edge[i].to;
if(!vis[v])
{
tjdfs(v);
low[u]=min(low[u],low[v]);
if(low[v]>dfn[u])
{
res[edge[i].id]=2;
//cout<<edge[i].id<<" dsf"<<endl;
}
}
else
low[u]=min(low[u],dfn[v]);
}
}
}
void init_edge()
{
etot=vtime=0;
for(int j=0;j<tot;j++)
{
int u=p[stk[j]].u;
int v=p[stk[j]].v;
u=find(u);v=find(v);
head[u]=head[v]=-1;vis[u]=vis[v]=false;
}
}
int main()
{
int i,j;
cin>>n>>m;
for(i=0;i<=n;i++)
bo[i]=i;
for(i=0;i<m;i++)
{
scanf("%d%d%d",&p[i].u,&p[i].v,&p[i].cost);
p[i].id=i;
}
sort(p,p+m,cmp);
p[m].u=p[m].v=0;p[m].id=m;p[m].cost=-11111;
int last=-1;
for(i=0;i<=m;i++)
{
//cout<<p[i].u<<" "<<p[i].v<<endl;
if(p[i].cost!=last&&tot)
{
init_edge();
for(j=0;j<tot;j++)
{
int u=p[stk[j]].u;int v=p[stk[j]].v;
u=find(u);v=find(v);
if(u!=v)
{
add_edge(u,v,p[stk[j]].id);
add_edge(v,u,p[stk[j]].id);
}
}
for(j=0;j<tot;j++)
{
int u=find(p[stk[j]].u);
if(!vis[u])
tjdfs(u);
}
while(tot)
{
tot--;
int u=p[stk[tot]].u;int v=p[stk[tot]].v;
Union(u,v);
}
}
if(find(p[i].u)==find(p[i].v))
res[p[i].id]=0;
else
res[p[i].id]=1;
last=p[i].cost;
stk[tot++]=i;
}
for(i=0;i<m;i++)
if(res[i]==1)
puts("at least one");
else if(res[i]==2)
puts("any");
else
puts("none");
}

/*dltqhdtbmfbictfmekbhfscnpttkhmpcpokojbpnhicbhtnmjg*/


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<cstdio>
using namespace std;
const int maxn=111111;
int bleg[maxn],n,m;
int ans[maxn];
struct node
{
    int u,v,w,cnt;
}edge[maxn];
const int inf=0x7fffffff;
int head[maxn],low[maxn],num,vis[maxn];
int tol,tim,dfn[maxn],stk[maxn],tp;
struct Node
{
    int to,next,cnt;
    bool vis,bge;
}edges[maxn*4];
void INIT()
{
    tol=0,tim=1;
    memset(head,-1,sizeof(head));
    memset(dfn,-1,sizeof(dfn));
}
void add(int a,int b,int c)
{
    edges[tol].to=b;
    edges[tol].cnt=c;
	edges[tol].bge=false;
    edges[tol].next=head[a];
    edges[tol].vis=false;
    head[a]=tol++;
}
void tarjan(int u)
{
    int i,v;
//    cout<<u<<endl;
    dfn[u]=low[u]=tim++;
    for(i=head[u];i!=-1;i=edges[i].next)
    {
        v=edges[i].to;
        if(edges[i].vis) continue;
        edges[i].vis=edges[i^1].vis=true;
//        cout<<"!!"<<edges[i].cnt<<endl;
		if(dfn[v]==-1)
        {

            tarjan(v);
            low[u]=min(low[u],low[v]);
            if(dfn[u]<low[v])
            {
//            	cout<<edges[i].cnt<<"@"<<endl;
            	ans[edges[i].cnt]=2;

            }
        }
        else low[u]=min(low[u],dfn[v]);
    }
}
bool cmp(node a,node b)
{
    return a.w<b.w;
}
int Find (int x)
{
    int p,y=x;
    while(y!=bleg[y])
    y=bleg[y];
    while(x!=bleg[x])
    {
        p=bleg[x];
        bleg[x]=y;
        x=p;
    }
    return y;
}
void Union(int a,int b)
{
    int ra=Find(a),rb=Find(b);
    if(rand()%2) bleg[ra]=rb;
    else bleg[rb]=ra;
}
int main()
{
    int i,j,las=-1,len,tol,u,v,c;
    scanf("%d%d",&n,&m);
    INIT();
    for(i=0;i<=n;i++)
    bleg[i]=i;
    for(i=0;i<m;i++)
    scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].w),edge[i].cnt=i;
    sort(edge,edge+m,cmp);
    memset(ans,0,sizeof(ans));
    for(i=0;i<m;i++)
    {
        if(Find(edge[i].u)!=Find(edge[i].v))
        {
            len=edge[i].w;
            INIT(),num=0,tp=0;
            for(j=i;j<m&&j>las;j++)
            {
                if(edge[j].w>len) break;
                las=j;
                u=Find(edge[j].u),v=Find(edge[j].v),c=edge[j].cnt;
                if(Find(edge[j].u)!=Find(edge[j].v))
                {
					ans[edge[j].cnt]=1;
					stk[tp++]=u,stk[tp++]=v;
//					cout<<u<<" "<<v<<" "<<c<<endl;
					add(u,v,c);
					add(v,u,c);
				}
            }
            for(j=i;j<m&&j<=las;j++)
            {
            	if(Find(edge[j].u)!=Find(edge[j].v))
				{
					Union(edge[j].u,edge[j].v);
				}
            }
            while(tp>0)
            {
            	u=stk[--tp];
            	if(dfn[u]==-1) tarjan(u);
            }
//            cout<<endl;
        }
    }
    for(i=1;i<=n;i++)
    if(dfn[i]==-1) tarjan(i);
    for(i=0;i<m;i++)
    {
    	if(ans[i]==0) printf("none\n");
    	else if(ans[i]==2) printf("any\n");
    	else if(ans[i]==1) printf("at least one\n");
    }
}
/*
6 6
1 2 1
2 3 1
3 4 1
3 5 1
4 6 1
5 6 1

4 5
1 2 101
1 3 100
2 3 2
2 4 2
3 4 1
*/

/*bfcshgendjgmcmkamjjeeoqhsaislajefecectjgipskiikmjl*/


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>

using namespace std;

#define MAXN 100010
#define _clr(x,y) memset(x,y,sizeof(x))

struct Edge
{
	int to,id,next;
	bool bge,vis;
	Edge(){}
	Edge(int a,int b,int c,bool d=false):
to(a),id(b),next(c),bge(d),vis(d){}
}edge[MAXN*2];

struct Node
{
	int id;
	int u,v,len;
}data[MAXN];

int n,m;
int tot,index;
int head[MAXN],dfn[MAXN],low[MAXN],pre[MAXN];

int vt[MAXN];
int res[MAXN];
int bleg[MAXN];

bool vis[MAXN];

bool cmp(Node a,Node b)
{
	return a.len<b.len;
}

void init()
{
	for(int i=1;i<=n;i++) bleg[i]=i;
}

int Find(int x)
{
	return bleg[x]==x?x:bleg[x]=Find(bleg[x]);
}

void Union(int a,int b)
{
	bleg[Find(a)]=Find(b);
}

inline void add_edge(int a,int b,int id)
{
	edge[tot]=Edge(b,id,head[a]);
	head[a]=tot++;
	edge[tot]=Edge(a,id,head[b]);
	head[b]=tot++;
}

void dfs(int u)
{
	dfn[u]=low[u]=++index;
	for(int i=head[u];i!=-1;i=edge[i].next)
	{
		if(edge[i].vis) continue;
		edge[i].vis=edge[i^1].vis=true;
		int v=edge[i].to;
		if(dfn[v]==-1)
		{
			pre[v]=u;
			dfs(v);
			low[u]=min(low[u],low[v]);
		}
		else
		{
			low[u]=min(low[u],dfn[v]);
		}
	}
}

void cal_ae()
{
	int i;
	index=0;
	for(i=1;i<=vt[0];i++)
	{
		if(dfn[vt[i]]==-1) dfs(vt[i]);
	}
	for(i=0;i<tot;i++)
	{
		if(edge[i].bge) continue;
		int u=edge[i^1].to;
		int v=edge[i].to;
		if(pre[v]==u && dfn[u]<low[v])
		{
			res[edge[i].id]=2;
			edge[i].bge=edge[i^1].bge=true;
		}
	}
}

int main()
{
	int i,j,u,v;
	cin>>n>>m;
	for(i=0;i<m;i++)
	{
		data[i].id=i;
		scanf("%d%d%d",&data[i].u,&data[i].v,&data[i].len);
	}
	init();
	sort(data,data+m,cmp);
	for(i=0;i<m;i=j)
	{
		tot=vt[0]=0;
		for(j=i;j<m && data[j].len==data[i].len;j++)
		{
			u=Find(data[j].u),v=Find(data[j].v);
			if(u!=v)
			{
				res[data[j].id]=1;
				dfn[u]=dfn[v]=head[u]=head[v]=-1;
				if(!vis[u]) vt[++vt[0]]=u,vis[u]=true;
				if(!vis[v]) vt[++vt[0]]=v,vis[v]=true;
			}
		}
		for(j=i;j<m && data[j].len==data[i].len;j++)
		{
			u=Find(data[j].u),v=Find(data[j].v);
			if(u!=v)
			{
				vis[u]=vis[v]=false;
				add_edge(u,v,data[j].id);
			}
		}
		cal_ae();
		for(j=i;j<m && data[j].len==data[i].len;j++)
		{
			u=Find(data[j].u),v=Find(data[j].v);
			if(u!=v)
			{
				Union(u,v);
			}
		}
	}
	for(i=0;i<m;i++)
	{
		if(res[i]==0) puts("none");
		else if(res[i]==1) puts("at least one");
		else puts("any");
	}
	return 0;
}

/*fbpslfcqpfhcpebertmjprlsofqkehjcbeambcbrtaloeetbdd*/


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<cstdio>
using namespace std;
const int maxn=111111;
int bleg[maxn],n,m;
int ans[maxn];
struct node
{
    int u,v,w,cnt;
}edge[maxn];
bool cmp(node a,node b)
{
    return a.w<b.w;
}
int Find (int x)
{
    int p,y=x;
    while(y!=bleg[y])
    y=bleg[y];
    while(x!=bleg[x])
    {
        p=bleg[x];
        bleg[x]=y;
        x=p;
    }
    return y;
}
void Union(int a,int b)
{
    int ra=Find(a),rb=Find(b);
    if(rand()%2) bleg[ra]=rb;
    else bleg[rb]=ra;
}
int main()
{
    int i,j,las=-1,len,num,tol;
    scanf("%d%d",&n,&m);
    for(i=0;i<=n;i++)
    bleg[i]=i;
    for(i=0;i<m;i++)
    scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].w),edge[i].cnt=i;
    sort(edge,edge+m,cmp);
    memset(ans,0,sizeof(ans));
    for(i=0;i<m;i++)
    {
        if(Find(edge[i].u)!=Find(edge[i].v))
        {
            len=edge[i].w,num=0,tol=0;
            for(j=i;j<m&&j>las;j++)
            {
                if(edge[j].w>len) break;
                las=j;
                if(Find(edge[j].u)!=Find(edge[j].v))
                ans[edge[j].cnt]=1,tol++;
            }
            for(j=i;j<m&&j<=las;j++)
            {
            	if(Find(edge[j].u)!=Find(edge[j].v))
				Union(edge[j].u,edge[j].v),num++;
			}
			if(num==tol)
            {
				for(j=i;j<m&&j<=las;j++)
            	{
            		if(ans[edge[j].cnt]==1)
            		ans[edge[j].cnt]=2;
            	}
            }
        }
    }
    for(i=0;i<m;i++)
    {
    	if(ans[i]==0) printf("none\n");
    	else if(ans[i]==2) printf("any\n");
    	else if(ans[i]==1) printf("at least one\n");
    }
}

/*pjhpqlcsfpsbfikeigrkkjoqlfkebocipbplnjkkeadbingjmd*/


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int maxn=1111111;
const int Maxn=111111;
int vis[maxn];
int num[maxn],bleg[maxn],n,m,l[Maxn];
int f[Maxn],ff[Maxn],ans[Maxn],us[Maxn];
struct node
{
	int u,v,w;
}edge[Maxn];
bool cmp(node a,node b)
{
	return a.w<b.w;
}
int Find(int x)
{
	int y=x,px;
	while(y!=bleg[y])
	{
		y=bleg[y];
	}
	while(x!=bleg[x])
	{
		px=bleg[x];
		bleg[x]=y;
		x=px;
	}
	return y;
}
void Union(int a,int b)
{
	int ra=Find(a),rb=Find(b);
	if(rand()%2) bleg[ra]=rb;
	else bleg[rb]=ra;
}
int main()
{
	int i,j,a,b,c;
	scanf("%d%d",&n,&m);
	for(i=0;i<m;i++)
	{
		scanf("%d%d%d",&f[i],&ff[i],&l[i]);
		edge[i].u=f[i],edge[i].v=ff[i],edge[i].w=l[i];
	}
	sort(edge,edge+m,cmp);
	memset(vis,0,sizeof(vis));
	memset(num,0,sizeof(num));
	memset(us,0,sizeof(us));
	memset(ans,-1,sizeof(ans));
	for(i=0;i<=n;i++)
	bleg[i]=i;
	for(i=0;i<m;i++)
	{
		if(Find(edge[i].u)!=Find(edge[i].v))
		{
			Union(edge[i].u,edge[i].v);
			vis[edge[i].w]=1;
			us[edge[i].w]++;
		}
		if(vis[edge[i].w]) num[edge[i].w]++;
	}
	for(i=1;i<=n;i++)
	bleg[i]=i;
	for(i=0;i<m;i++)
	{
		if(vis[l[i]]&&us[l[i]]==num[l[i]])
		Union(f[i],ff[i]),ans[i]=1;
	}
	for(i=0;i<m;i++)
	{
		if(vis[l[i]])
		{
			if(Find(f[i])==Find(ff[i])&&ans[i]==-1)
			{
				num[l[i]]--,ans[i]=0;
				if(num[l[i]]==0) vis[l[i]]=0;
				else vis[l[i]]=2;
			}
		}
	}
	for(i=0;i<m;i++)
	{
		if(ans[i]!=-1)
		{
			if(ans[i]==1) printf("any\n");
			else if(ans[i]==0) printf("none\n");
			else if(ans[i]==2) printf("at least one\n");
		}
		else if(vis[l[i]]==0)
		printf("none\n");
		else if(vis[l[i]]==1)
		{
			if(num[l[i]]==1) printf("any\n");
			else printf("at least one\n");
		}
		else if(vis[l[i]]==2)
		{
			if(ans[i]=0) printf("none\n");
			else printf("at least one\n");
		}
	}
}
/*
none
any
at least one
at least one
any
*/

/*tfmfdlerhnbkqnitkrsastmeafpniamtgqfbhjkpolrcqrbhom*/


#include<iostream>
#include<algorithm>
#include<string>
#include<cstdlib>
#include<cstdio>
using namespace std;
const int maxn=111111;
int bleg[maxn],n,m;
int ans[maxn];
struct node
{
    int u,v,w,cnt;
}edge[maxn];
bool cmp(node a,node b)
{
    return a.w<b.w;
}
int Find (int x)
{
    int p,y=x;
    while(y!=bleg[y])
    y=bleg[y];
    while(x!=bleg[x])
    {
        p=bleg[x];
        bleg[x]=y;
        x=p;
    }
    return y;
}
void Union(int a,int b)
{
    int ra=Find(a),rb=Find(b);
    if(rand()%2) bleg[ra]=rb;
    else bleg[rb]=ra;
}
int main()
{
    int i,j,las=-1,len,num,tol;
    scanf("%d%d",&n,&m);
    for(i=0;i<=n;i++)
    bleg[i]=i;
    for(i=0;i<m;i++)
    scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].w),edge[i].cnt=i;
    sort(edge,edge+m,cmp);
    memset(ans,0,sizeof(ans));
    for(i=0;i<m;i++)
    {
        if(Find(edge[i].u)!=Find(edge[i].v))
        {
            len=edge[i].w,num=0,tol=0;
            for(j=i;j<m&&j>las;j++)
            {
                if(edge[j].w>len) break;
                las=j;
                if(Find(edge[j].u)!=Find(edge[j].v))
                ans[edge[j].cnt]=1,tol++;
            }
            for(j=i;j<m&&j<=las;j++)
            {
            	if(Find(edge[j].u)!=Find(edge[j].v))
				Union(edge[j].u,edge[j].v),num++;
			}
			if(num==tol)
            {
				for(j=i;j<m&&j<=las;j++)
            	{
            		if(ans[edge[j].cnt]==1)
            		ans[edge[j].cnt]=2;
            	}
            }
        }
    }
    for(i=0;i<m;i++)
    {
    	if(ans[i]==0) printf("none\n");
    	else if(ans[i]==2) printf("any\n");
    	else if(ans[i]==1) printf("at least one\n");
    }
}

/*clqtsdgshfhfmadskdgdlkcfgmlkhttjciamltcsejqrcthmdn*/


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int a[100005];
int main()
{
	__int64 n,m;
	while(scanf("%I64d%I64d",&n,&m)!=EOF)
	{
		for(int i=1;i<=n;i++)
		scanf("%d",a+i);
		sort(a+1,a+n+1);
		int x,y;
		x=m/n;
		y=m%n;
		if(y==0)
		y=n;
		else
		x++;
		int num=0,sum1,sum2;
		for(int i=x+1;i<=n;i++)
		{
			if(a[i]==a[x])
			num++;
			else
			break;
		}
		sum1=x+num;
		for(int i=x-1;i>0;i--)
		{
			if(a[i]==a[x])
			num++;
			else
			break;
		}
		sum2=sum1-num-1;
		if(!num)
		printf("%d %d\n",a[x],a[y]);
		else
		{
			num++;
			m-=sum2*n;
			y=m/num;
			if(m%num)
			y++;
			printf("%d %d\n",a[x],a[y]);
		}
	}
	return 0;
}

/*bdqrecchktrqfnfatqoeafratpochiaalqrhklgmlejqjgiicc*/


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;

const int Maxv=200110;
int n,m;
int bo[Maxv],stk[Maxv],tot;
int res[Maxv],head[Maxv],etot,low[Maxv],dfn[Maxv],vtime;
bool vis[Maxv];
struct P
{
    int id,u,v,cost;
}p[Maxv];
struct Edge
{
    int u,v,next,id,to;
    bool evis;
}edge[Maxv*2];

bool cmp( P a, P b)
{
    return a.cost<b.cost;
}

int find(int u)
{
    return bo[u]=(bo[u]==u?u:find(bo[u]));
}

bool Union(int u,int v)
{
    u=find(u);
    v=find(v);
    if(u==v)
    return false;
    bo[v]=u;
    return true;
}

void add_edge(int u,int v,int id)
{
    edge[etot].to=v;
    edge[etot].next=head[u];
    edge[etot].id=id;
    edge[etot].evis=false;
    head[u]=etot++;
}

void tjdfs(int u)
{
    vis[u]=true;
    dfn[u]=low[u]=vtime++;
    for(int i=head[u];i!=-1;i=edge[i].next)
    {
        if(!edge[i].evis)
        {
            edge[i].evis=edge[i^1].evis=true;
            int v=edge[i].to;
            if(!vis[v])
            {
                tjdfs(v);
                low[u]=min(low[u],low[v]);
                if(low[v]>dfn[u])
                {
                    res[edge[i].id]=2;
                    //cout<<edge[i].id<<" dsf"<<endl;
                }
            }
            else
                low[u]=min(low[u],dfn[v]);
        }
    }
}

void init_edge()
{
    etot=vtime=0;
    for(int j=0;j<tot;j++)
    {
        int u=p[stk[j]].u;
        int v=p[stk[j]].v;
        u=find(u);v=find(v);
        head[u]=head[v]=-1;vis[u]=vis[v]=false;
    }
}

int main()
{
    int i,j;
    cin>>n>>m;
    for(i=1;i<=n;i++)
    bo[i]=i;
    for(i=0;i<m;i++)
    {
        scanf("%d%d%d",&p[i].u,&p[i].v,&p[i].cost);
        p[i].id=i;
    }
    sort(p,p+m,cmp);
    p[m].u=p[m].v=0;p[m].id=m;p[m].cost=-11111;
    int last=-1;
    for(i=0;i<=m;i++)
    {
        //cout<<p[i].u<<" "<<p[i].v<<endl;
        if(p[i].cost!=last&&tot)
        {
            init_edge();
            for(j=0;j<tot;j++)
            {
                int u=p[stk[j]].u;int v=p[stk[j]].v;
                u=find(u);v=find(v);
                if(u!=v)
                {
                    add_edge(u,v,p[stk[j]].id);
                    add_edge(v,u,p[stk[j]].id);
                }
            }
            tjdfs(find(p[stk[0]].v));
            while(tot)
            {
                tot--;
                int u=p[stk[tot]].u;int v=p[stk[tot]].v;
                Union(u,v);
            }
        }
        if(find(p[i].u)==find(p[i].v))
        res[p[i].id]=0;
        else
        res[p[i].id]=1;
        last=p[i].cost;
        stk[tot++]=i;
    }
    for(i=0;i<m;i++)
    if(res[i]==1)
    puts("at least one");
    else if(res[i]==2)
    puts("any");
    else
    puts("none");
}

/*
3 3
1 2 10
2 3 11
1 3 3

4 5
1 2 2
2 4 3
1 3 1
2 3 4
1 4 5

4 5
1 4 5
2 4 3
2 3 4
1 3 1
1 2 2

4 6
1 2 2
2 4 3
1 3 1
2 3 3
3 4 2
1 4 2

*/

/*rkkhkmbafqljqporpgbhgcsnmbjmgprdfalimmariesqtffplt*/


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;

const int Maxv=200110;
int n,m;
int bo[Maxv],stk[Maxv],tot;
int res[Maxv],head[Maxv],etot,low[Maxv],dfn[Maxv],vtime;
bool vis[Maxv];
struct P
{
    int id,u,v,cost;
}p[Maxv];
struct Edge
{
    int u,v,next,id,to;
    bool evis;
}edge[Maxv*2];

bool cmp( P a, P b)
{
    return a.cost<b.cost;
}

int find(int u)
{
    return bo[u]=(bo[u]==u?u:find(bo[u]));
}

bool Union(int u,int v)
{
    u=find(u);
    v=find(v);
    if(u==v)
    return false;
    bo[v]=u;
    return true;
}

void add_edge(int u,int v,int id)
{
    edge[etot].to=v;
    edge[etot].next=head[u];
    edge[etot].id=id;
    edge[etot].evis=false;
    head[u]=etot++;
}

void tjdfs(int u)
{
    vis[u]=true;
    dfn[u]=low[u]=vtime++;
    for(int i=head[u];i!=-1;i=edge[i].next)
    {
        if(!edge[i].evis)
        {
            edge[i].evis=edge[i^1].evis=true;
            int v=edge[i].to;
            if(!vis[v])
            {
                tjdfs(v);
                low[u]=min(low[u],low[v]);
                if(low[v]>dfn[u])
                {
                    res[edge[i].id]=2;
                    //cout<<edge[i].id<<" dsf"<<endl;
                }
            }
            else
                low[u]=min(low[u],dfn[v]);
        }
    }
}

void init_edge()
{
    etot=vtime=0;
    for(int j=0;j<tot;j++)
    {
        int u=p[stk[j]].u;
        int v=p[stk[j]].v;
        u=find(u);v=find(v);
        head[u]=head[v]=-1;vis[u]=vis[v]=false;
    }
}

int main()
{
    int i,j;
    cin>>n>>m;
    for(i=0;i<=n;i++)
    bo[i]=i;
    for(i=0;i<m;i++)
    {
        scanf("%d%d%d",&p[i].u,&p[i].v,&p[i].cost);
        p[i].id=i;
    }
    sort(p,p+m,cmp);
    p[m].u=p[m].v=0;p[m].id=m;p[m].cost=-11111;
    int last=-1;
    for(i=0;i<=m;i++)
    {
        //cout<<p[i].u<<" "<<p[i].v<<endl;
        if(p[i].cost!=last&&tot)
        {
            init_edge();
            for(j=0;j<tot;j++)
            {
                int u=p[stk[j]].u;int v=p[stk[j]].v;
                u=find(u);v=find(v);
                if(u!=v)
                {
                    add_edge(u,v,p[stk[j]].id);
                    add_edge(v,u,p[stk[j]].id);
                }
            }
            for(j=0;j<tot;j++)
            {
                int u=find(p[stk[j]].u);
                if(!vis[u])
                tjdfs(u);
            }
            while(tot)
            {
                tot--;
                int u=p[stk[tot]].u;int v=p[stk[tot]].v;
                Union(u,v);
            }
        }
        if(find(p[i].u)==find(p[i].v))
        res[p[i].id]=0;
        else
        res[p[i].id]=1;
        last=p[i].cost;
        stk[tot++]=i;
    }
    for(i=0;i<m;i++)
    if(res[i]==1)
    puts("at least one");
    else if(res[i]==2)
    puts("any");
    else
    puts("none");
}

/*
3 3
1 2 10
2 3 11
1 3 3

4 5
1 2 2
2 4 3
1 3 1
2 3 4
1 4 5

4 5
1 4 5
2 4 3
2 3 4
1 3 1
1 2 2

4 6
1 2 2
2 4 3
1 3 1
2 3 3
3 4 2
1 4 2

*/

/*pglrdttikoeeplrdsedtegibhsejcefjkigfhsnjesnljdgttj*/


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;

const int Maxv=100110;
int n,m;
int bo[Maxv],stk[Maxv],tot;
int res[Maxv],head[Maxv],etot,low[Maxv],dfn[Maxv],vtime;
bool vis[Maxv];
struct P
{
    int id,u,v,cost;
}p[Maxv];
struct Edge
{
    int u,v,next,id,to;
    bool evis;
}edge[Maxv*2];

bool cmp( P a, P b)
{
    return a.cost<b.cost;
}

int find(int u)
{
    return bo[u]=(bo[u]==u?u:find(bo[u]));
}

bool Union(int u,int v)
{
    u=find(u);
    v=find(v);
    if(u==v)
    return false;
    bo[v]=u;
    return true;
}

void add_edge(int u,int v,int id)
{
    edge[etot].to=v;
    edge[etot].next=head[u];
    edge[etot].id=id;
    edge[etot].evis=false;
    head[u]=etot++;
}

void tjdfs(int u)
{
    vis[u]=true;
    dfn[u]=low[u]=vtime++;
    for(int i=head[u];i!=-1;i=edge[i].next)
    {
        if(!edge[i].evis)
        {
            edge[i].evis=edge[i^1].evis=true;
            int v=edge[i].to;
            if(!vis[v])
            {
                tjdfs(v);
                low[u]=min(low[u],low[v]);
                if(low[v]>dfn[u])
                {
                    res[edge[i].id]=2;
                    //cout<<edge[i].id<<" dsf"<<endl;
                }
            }
            else
                low[u]=min(low[u],dfn[v]);
        }
    }
}

void init_edge()
{
    etot=vtime=0;
    for(int j=0;j<tot;j++)
    {
        int u=p[stk[j]].u;int v=p[stk[j]].v;
        u=find(u);v=find(v);
        head[u]=head[v]=-1;vis[u]=vis[v]=false;
    }
}

int main()
{
    int i,j;
    cin>>n>>m;
    for(i=1;i<=n;i++)
    bo[i]=i;
    for(i=0;i<m;i++)
    {
        scanf("%d%d%d",&p[i].u,&p[i].v,&p[i].cost);
        p[i].id=i;
    }
    sort(p,p+m,cmp);
    p[m].u=p[m].v=0;p[m].id=m;p[m].cost=-11;
    int last=-1;
    for(i=0;i<=m;i++)
    {
        //cout<<p[i].u<<" "<<p[i].v<<endl;
        if(p[i].cost!=last)
        {
            init_edge();
            for(j=0;j<tot;j++)
            {
                int u=p[stk[j]].u;int v=p[stk[j]].v;
                u=find(u);v=find(v);
                if(res[p[stk[j]].id])
                {
                    add_edge(u,v,p[stk[j]].id);
                    add_edge(v,u,p[stk[j]].id);
                }
            }
            if(tot)
            tjdfs(find(p[stk[0]].u));
            while(tot)
            {
                tot--;
                int u=p[stk[tot]].u;int v=p[stk[tot]].v;
                Union(u,v);
            }
        }
        if(find(p[i].u)==find(p[i].v))
        res[p[i].id]=0;
        else
        res[p[i].id]=1;
        last=p[i].cost;
        stk[tot++]=i;
    }
    for(i=0;i<m;i++)
    if(res[i]==1)
    puts("at least one");
    else if(res[i]==2)
    puts("any");
    else
    puts("none");
}

/*tltccoebqbgpktpeibnktrqaaefekndbqcdsraanngadrhhrjm*/


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w;
}edge[MAX_N];
int idx[MAX_N];
bool compare(int a, int b){
    return edge[a].w < edge[b].w;
}
struct data2{
    int v, at;
    struct data2 *next;
} adj[3*MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
    static int tail;
    adj[++tail].v = v;
    adj[tail].at = id;
    adj[tail].next = head[u];
    head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    if (boss[x] == 0)
        return x;
    return boss[x] = find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N];
bitset <MAX_N> visit;
static int stamp;
void tarjan(int vtx){
    dpt[vtx] = low[vtx] = ++stamp;
    for(data2 *p=head[vtx]; p!=NULL; p=p->next){
        if(visit[p->at])
            continue;
        visit[p->at] = true;
        if(dpt[p->v] != 0)
            low[vtx] = min(low[vtx], dpt[p->v]);
        else{
            tarjan(p->v);
            if(low[p->v] > dpt[vtx])
                type[p->at] = 2;
            low[vtx] = min(low[vtx], low[p->v]);
        }
    }
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int i=1; i<=m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        idx[i] = i;
    }
    sort(idx+1, idx+m+1, compare);
    for(int i=1, j=0; i<=m; i=j){
        for(j=i; j<=m; j++)
            if(edge[idx[j]].w != edge[idx[i]].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = 0;
            head[*cc] = NULL;
        }
        S.clear();
        ::stamp = 0;
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v){
                type[idx[e]] = 1;
                add_edge(u, v, idx[e]);
                add_edge(v, u, idx[e]);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(dpt[*ss] == 0)
                tarjan(*ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=1; i<=m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


#include <cstdio>
#include <set>
#include <algorithm>

using namespace std;

const int MAXN=100005;

int n, m, nadj, ndfs, fa[MAXN], idx[MAXN], dfn[MAXN], low[MAXN];
bool vis[MAXN];
set<int> vx;

struct Edge {
    int u, v, w, state;
} E[MAXN];

struct Edge2 {
    int v, at;
    Edge2 *next;
} adj[MAXN*2], *fir[MAXN];

bool Cmp(int a, int b)
{
    return E[a].w<E[b].w;
}

int GetFa(int x)
{
    if (!fa[x])
        return x;
    return (fa[x]=GetFa(fa[x]));
}

void AddEdge(int x, int y, int at)
{
    static int cnt;
    adj[++cnt].v = y;
    adj[cnt].next = fir[x];
    adj[cnt].at = at;
    fir[x] = adj+cnt;
}

void Init()
{
    scanf("%d%d", &n, &m);
    for (int i=1; i<=m; i++) {
        scanf("%d%d%d", &E[i].u, &E[i].v, &E[i].w);
        idx[i] = i;
    }
    sort(idx+1, idx+m+1, Cmp);
}

void DFS(int x)
{
    dfn[x] = low[x] = ++ndfs;
    for (Edge2 *p=fir[x]; p; p=p->next) {
        if (vis[p->at])
            continue;
        vis[p->at] = true;
        if (!dfn[p->v]) {
            DFS(p->v);
            if (low[p->v] > dfn[x])
                E[p->at].state = 2;
            low[x] = min(low[x], low[p->v]);
        }
        else
            low[x] = min(low[x], dfn[p->v]);
    }
}

void Work()
{
    int i, j, r, x, y;
    set<int>::iterator it;
    for (i=1; i<=m;) {
        for (it=vx.begin(); it!=vx.end(); it++) {
            fir[*it] = 0;
            dfn[*it] = low[*it] = 0;
        }
        nadj = ndfs = 0;
        vx.clear();
        for (r=i; r<=m; r++) {
            if (E[idx[r]].w != E[idx[i]].w)
                break;
        }
        for (j=i; j<r; j++) {
            x = GetFa(E[idx[j]].u);
            y = GetFa(E[idx[j]].v);
            if (x != y) {
                E[idx[j]].state = 1;
                AddEdge(x, y, idx[j]);
                AddEdge(y, x, idx[j]);
                vx.insert(x);
                vx.insert(y);
            }
        }
        for (it=vx.begin(); it!=vx.end(); it++) {
            if (!dfn[*it])
                DFS(*it);
        }
        for (j=i; j<r; j++) {
            x = GetFa(E[idx[j]].u);
            y = GetFa(E[idx[j]].v);
            if (x != y)
                fa[x] = y;
        }
        i = r;
    }
}

void Output()
{
    for (int i=1; i<=m; i++) {
        if (E[i].state == 0)
            puts("none");
        else if (E[i].state == 1)
            puts("at least one");
        else
            puts("any");
    }
}

int main()
{
    Init();
    Work();
    Output();
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w, id;
    inline bool operator < (const data &d) const{
        return w < d.w;
    }
}edge[MAX_N];
struct data2{
    int v, at;
    struct data2 *next;
} adj[3*MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
    static int tail;
    adj[++tail].v = v;
    adj[tail].at = id;
    adj[tail].next = head[u];
    head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    return boss[x] == x? x: find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N], color[MAX_N];
bitset <MAX_N> visit;
enum {WHITE = 0, GRAY = 1, BLACK = 2};
void tarjan(int depth, int vtx){
    color[vtx] = GRAY;
    dpt[vtx] = low[vtx] = depth;
    for(data2 *p=head[vtx]; p!=NULL; p=p->next){
        if(visit[p->at])
            continue;
        visit[p->at] = true;
        if(color[p->v] == GRAY){
            low[vtx] = min(low[vtx], dpt[p->v]);
        }else if(color[p->v] == WHITE){
            tarjan(depth+1, p->v);
            low[vtx] = min(low[vtx], low[p->v]);
            if(low[p->v] > dpt[vtx])
                type[p->at] = 2;
        }
    }
    color[vtx] = BLACK;
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int v=1; v<=n; v++)
        boss[v] = v;
    for(int i=0; i<m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        e.id = i;
    }
    sort(edge, edge+m);
    for(int i=0, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[j].w != edge[i].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = color[*cc] = 0;
            head[*cc] = NULL;
        }
        S.clear();
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v){
                type[edge[e].id] = 1;
                add_edge(u, v, edge[e].id);
                add_edge(v, u, edge[e].id);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(color[*ss] == WHITE)
                tarjan(1, *ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=0; i<m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w, id;
    inline bool operator < (const data &d) const{
        return w < d.w;
    }
}edge[MAX_N];
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    return boss[x] = (boss[x] == x? x: find_boss(boss[x]));
}
set <int> S;
int dpt[MAX_N], low[MAX_N], color[MAX_N];
bitset <MAX_N> visit;
enum {WHITE = 0, GRAY = 1, BLACK = 2};
vector <int> G[MAX_N]; //G[u][i] := u點有i號邊
void tarjan(int depth, int vtx){
    color[vtx] = GRAY;
    dpt[vtx] = low[vtx] = depth;
    FOR(itr, G[vtx]){
        if(visit[*itr])
            continue;
        visit[*itr] = true;
        data &e = edge[*itr];
        int v = (find_boss(e.a) == vtx? find_boss(e.b): find_boss(e.a));
        if(color[v] == GRAY){
            low[vtx] = min(low[vtx], dpt[v]);
        }else if(color[v] == WHITE){
            tarjan(depth+1, v);
            low[vtx] = min(low[vtx], low[v]);
            if(low[v] > dpt[vtx])
                type[edge[*itr].id] = 2;
        }
    }
    color[vtx] = BLACK;
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int v=1; v<=n; v++)
        boss[v] = v;
    for(int i=0; i<m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        e.id = i;
    }
    sort(edge, edge+m);
    for(int i=0, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[j].w != edge[i].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = color[*cc] = 0;
            G[*cc].clear();
        }
        S.clear();
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v){
                type[edge[e].id] = 1;
                G[u].PB(e);
                G[v].PB(e);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(color[*ss] == WHITE)
                tarjan(1, *ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=0; i<m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w;
}edge[MAX_N];
int idx[MAX_N];
bool compare(int a, int b){
    return edge[a].w < edge[b].w;
}
struct data2{
    int v, at;
    struct data2 *next;
} adj[3*MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
    static int tail;
    adj[++tail].v = v;
    adj[tail].at = id;
    adj[tail].next = head[u];
    head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    return boss[x] == x? x: find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N], color[MAX_N];
bitset <MAX_N> visit;
void tarjan(int depth, int vtx){
    dpt[vtx] = low[vtx] = depth;
    for(data2 *p=head[vtx]; p!=NULL; p=p->next){
        if(visit[p->at])
            continue;
        visit[p->at] = true;
        if(dpt[p->v] != 0)
            low[vtx] = min(low[vtx], dpt[p->v]);
        else{
            tarjan(depth+1, p->v);
            if(low[p->v] > dpt[vtx])
                type[p->at] = 2;
            low[vtx] = min(low[vtx], low[p->v]);
        }
    }
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int v=1; v<=n; v++)
        boss[v] = v;
    for(int i=0; i<m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        idx[i] = i;
    }
    sort(idx, idx+m, compare);
    for(int i=0, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[idx[j]].w != edge[idx[i]].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = 0;
            head[*cc] = NULL;
        }
        S.clear();
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v){
                type[idx[e]] = 1;
                add_edge(u, v, idx[e]);
                add_edge(v, u, idx[e]);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(dpt[*ss] == 0)
                tarjan(1, *ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=0; i<m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w;
}edge[MAX_N];
int idx[MAX_N];
bool compare(int a, int b){
    return edge[a].w < edge[b].w;
}
struct data2{
    int v, at;
    struct data2 *next;
} adj[3*MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
    static int tail;
    adj[++tail].v = v;
    adj[tail].at = id;
    adj[tail].next = head[u];
    head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    return boss[x] == x? x: find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N];
bitset <MAX_N> visit;
static int stamp;
void tarjan(int vtx){
    dpt[vtx] = low[vtx] = ++stamp;
    for(data2 *p=head[vtx]; p!=NULL; p=p->next){
        if(visit[p->at])
            continue;
        visit[p->at] = true;
        if(dpt[p->v] != 0)
            low[vtx] = min(low[vtx], dpt[p->v]);
        else{
            tarjan(p->v);
            if(low[p->v] > dpt[vtx])
                type[p->at] = 2;
            low[vtx] = min(low[vtx], low[p->v]);
        }
    }
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int v=1; v<=n; v++)
        boss[v] = v;
    for(int i=0; i<m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        idx[i] = i;
    }
    sort(idx, idx+m, compare);
    for(int i=0, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[idx[j]].w != edge[idx[i]].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = 0;
            head[*cc] = NULL;
        }
        S.clear();
        ::stamp = 0;
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v){
                type[idx[e]] = 1;
                add_edge(u, v, idx[e]);
                add_edge(v, u, idx[e]);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(dpt[*ss] == 0)
                tarjan(*ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=0; i<m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
	int a, b, w, id;
	inline bool operator < (const data &d) const{
		return w < d.w;
	}
}edge[MAX_N];
struct data2{
	int v, at;
	struct data2 *next;
} adj[MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
	static int tail;
	adj[++tail].v = v;
	adj[tail].at = id;
	adj[tail].next = head[u];
	head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
	return boss[x] == x? x: find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N], color[MAX_N];
bitset <MAX_N> visit;
enum {WHITE = 0, GRAY = 1, BLACK = 2};
void tarjan(int depth, int vtx){
	color[vtx] = GRAY;
	dpt[vtx] = low[vtx] = depth;
	for(data2 *p=head[vtx]; p!=NULL; p=p->next){
		if(visit[p->at])
			continue;
		visit[p->at] = true;
		if(color[p->v] == GRAY){
			low[vtx] = min(low[vtx], dpt[p->v]);
		}else if(color[p->v] == WHITE){
			tarjan(depth+1, p->v);
			low[vtx] = min(low[vtx], low[p->v]);
			if(low[p->v] > dpt[vtx])
				type[p->at] = 2;
		}
	}
	color[vtx] = BLACK;
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

	int n, m;
	scanf("%d %d", &n, &m);
	for(int v=1; v<=n; v++)
		boss[v] = v;
	for(int i=0; i<m; i++){
		data &e = edge[i];
		scanf("%d %d %d", &e.a, &e.b, &e.w);
		e.id = i;
	}
	sort(edge, edge+m);
	for(int i=0, j=0; i<m; i=j){
		for(j=i; j<m; j++)
			if(edge[j].w != edge[i].w)
				break;
		FOR(cc, S){
			dpt[*cc] = low[*cc] = color[*cc] = 0;
			head[*cc] = NULL;
		}
		S.clear();
		for(int e=i; e<j; e++){
			int u = find_boss(edge[e].a);
			int v = find_boss(edge[e].b);
			if(u != v){
				type[edge[e].id] = 1;
				add_edge(u, v, edge[e].id);
				add_edge(v, u, edge[e].id);
				S.insert(u);
				S.insert(v);
			}
		}
		FOR(ss, S)
			if(color[*ss] == WHITE)
				tarjan(1, *ss);
		for(int e=i; e<j; e++){
			int u = find_boss(edge[e].a);
			int v = find_boss(edge[e].b);
			if(u != v)
				boss[u] = v;
		}
	}
	for(int i=0; i<m; i++)
		if(type[i] == 0)
			puts("none");
		else if(type[i] == 1)
			puts("at least one");
		else
			puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w, id;
    inline bool operator < (const data &d) const{
        return w < d.w;
    }
}edge[MAX_N];
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    return boss[x] == x? x: find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N], color[MAX_N];
bitset <MAX_N> visit;
enum {WHITE = 0, GRAY = 1, BLACK = 2};
vector <int> G[MAX_N]; //G[u][i] := u點有i號邊
void tarjan(int depth, int vtx){
    color[vtx] = GRAY;
    dpt[vtx] = low[vtx] = depth;
    FOR(itr, G[vtx]){
        if(visit[*itr])
            continue;
        visit[*itr] = true;
        data &e = edge[*itr];
        int v = (find_boss(e.a) == vtx? find_boss(e.b): find_boss(e.a));
        if(color[v] == GRAY){
            low[vtx] = min(low[vtx], dpt[v]);
        }else if(color[v] == WHITE){
            tarjan(depth+1, v);
            low[vtx] = min(low[vtx], low[v]);
            if(low[v] > dpt[vtx])
                type[edge[*itr].id] = 2;
        }
    }
    color[vtx] = BLACK;
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int v=1; v<=n; v++)
        boss[v] = v;
    for(int i=0; i<m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        e.id = i;
    }
    sort(edge, edge+m);
    for(int i=0, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[j].w != edge[i].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = color[*cc] = 0;
            G[*cc].clear();
        }
        S.clear();
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v){
                type[edge[e].id] = 1;
                G[u].PB(e);
                G[v].PB(e);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(color[*ss] == WHITE)
                tarjan(1, *ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[e].a);
            int v = find_boss(edge[e].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=0; i<m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


/*******************\
|* # By longbiau # *|
\*******************/

// #include C {
#include<cstring>
#include<cassert>
#include<cstdio>
#include<cctype>
#include<cmath>
// }

// #include C++ {
#include<functional>
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<map>
#include<set>
// }
using namespace std;
// #typedef {
typedef long long int64;
typedef unsigned long long uint64;
typedef pair <int, int> PII;
typedef pair <int64, int64> PLL;
typedef pair <char, char> PCC;
typedef pair <double, double> PDD;
// }
#ifndef ONLINE_JUDGE
// #parameter{
#define TYPE decltype
/////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////
#define TYPE __typeof
// }
#endif
// #define {
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)(a).size())
#define X first
#define Y second
#define L(x) ((x)<<1)
#define R(x) ((x)<<1 | 1)
#define max3(x, y, z) (max(max((x), (y)), (z)))
#define min3(x, y, z) (min(min((x), (y)), (z)))
#define BIT(x, i) (((x) >> (i)) & 1)
#define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++)
/////////////////////////////////////////////////////////////
const double PI = 2.0*acos(0.0);
const double EPS = 1e-6;

#define GREATER(x, y) ((x) > (y) + EPS)
#define GREATER_EQUAL(x, y) ((x) > (y) - EPS)
#define LESS(x, y) ((x) < (y) - EPS)
#define LESS_EQUAL(x, y) ((x) < (y) + EPS)
#define EQUAL(x, y) (abs((x) - (y)) < EPS)

#define MAX_N 100005
#define MAXX 0x3f
#define MAX 2005
#define UPPER 2147483647LL
#define INF (1<<29)
#define NONE -1
#define NIL 0
// }

/////////////////////////////////////////////////////////////
struct data{
    int a, b, w;
}edge[MAX_N];
int idx[MAX_N];
bool compare(int a, int b){
    return edge[a].w < edge[b].w;
}
struct data2{
    int v, at;
    struct data2 *next;
} adj[3*MAX_N], *head[MAX_N];
void add_edge(int u, int v, int id){
    static int tail;
    adj[++tail].v = v;
    adj[tail].at = id;
    adj[tail].next = head[u];
    head[u] = adj+tail;
}
int type[MAX_N];
int boss[MAX_N];
int find_boss(int x){
    if (boss[x] == 0)
        return x;
    return boss[x] = find_boss(boss[x]);
}
set <int> S;
int dpt[MAX_N], low[MAX_N];
bitset <MAX_N> visit;
static int stamp;
void tarjan(int vtx){
    dpt[vtx] = low[vtx] = ++stamp;
    for(data2 *p=head[vtx]; p!=NULL; p=p->next){
        if(visit[p->at])
            continue;
        visit[p->at] = true;
        if(dpt[p->v] != 0)
            low[vtx] = min(low[vtx], dpt[p->v]);
        else{
            tarjan(p->v);
            if(low[p->v] > dpt[vtx])
                type[p->at] = 2;
            low[vtx] = min(low[vtx], low[p->v]);
        }
    }
}
/////////////////////////////////////////////////////////////
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif

    int n, m;
    scanf("%d %d", &n, &m);
    for(int i=1; i<=m; i++){
        data &e = edge[i];
        scanf("%d %d %d", &e.a, &e.b, &e.w);
        idx[i] = i;
    }
    sort(idx+1, idx+m+1, compare);
    for(int i=1, j=0; i<m; i=j){
        for(j=i; j<m; j++)
            if(edge[idx[j]].w != edge[idx[i]].w)
                break;
        FOR(cc, S){
            dpt[*cc] = low[*cc] = 0;
            head[*cc] = NULL;
        }
        S.clear();
        ::stamp = 0;
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v){
                type[idx[e]] = 1;
                add_edge(u, v, idx[e]);
                add_edge(v, u, idx[e]);
                S.insert(u);
                S.insert(v);
            }
        }
        FOR(ss, S)
            if(dpt[*ss] == 0)
                tarjan(*ss);
        for(int e=i; e<j; e++){
            int u = find_boss(edge[idx[e]].a);
            int v = find_boss(edge[idx[e]].b);
            if(u != v)
                boss[u] = v;
        }
    }
    for(int i=1; i<=m; i++)
        if(type[i] == 0)
            puts("none");
        else if(type[i] == 1)
            puts("at least one");
        else
            puts("any");
    return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define mp make_pair
vector <pair <int, pair <int, int> > > g;
vector<int> lc[100001], lp[100001];
int stat[100001];
void mst (int n, int m)
{
    vector <int> tree_id(n + 1);
    for (int i = 0; i <= n; i++)
            tree_id[i] = i;

    sort (g.begin(), g.end());
    for (int i = 0; i < m; i++) {
        int a, b, c;
        a = g[i].second.first;b = g[i].second.second; c = g[i].first;
    //    cout<<a<<" "<<b<<" "<<tree_id[a]<<" "<<tree_id[b]<<endl;
        if ((tree_id[a] == tree_id[b]) && lc[tree_id[a]].size() && (lc[tree_id[a]][0] == c)) {
            stat[i] = 1;
            int id = tree_id[a];
            for (int k = 0; k < lp[tree_id[a]].size(); k++)
                stat[lp[id][k]] = 1;
            }
         if (tree_id[a] != tree_id[b]) {
             int id = tree_id[a];
             stat[i] = 2;
             if (lc[id].size() && lc[id][0] == c) {
                 lc[id].push_back(c);
                 lp[id].push_back(i);
              }
             else {
              lc[id].clear(); lc[id].push_back(c);
              lp[id].clear(); lp[id].push_back(i);
              }
             int old = tree_id[b], nw = tree_id[a];
             for (int j = 0; j <= n; j++)
                 if (tree_id[j] == old) tree_id[j] = nw;
            }
    }
 }
 bool comp(int a, int b)
 {
    return g[a] < g[b];
 }
 int rev[100001], mapping[100001];
int main ()
{
    int n, m;
    cin>>n>>m;
    for (int i = 0; i < m; i++) {
        int f, t, c;
        cin>>f>>t>>c;
        g.push_back(mp(c,mp(f,t)));
        }
      for (int i = 0; i < m; i++)
          rev[i] = i;
     sort (rev, rev + m, comp);
     for (int i = 0; i < m; i++)
         mapping[rev[i]] = i;
     mst(n, m);
     for (int i = 0; i < m; i++) {
         int m = mapping[i];
         if (stat[m] == 1)
             cout<<"at least one"<<endl;
         else if (stat[m] == 2)
             cout<<"any"<<endl;
          else
              cout<<"none"<<endl;
      }
    return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<cstdio>
using namespace std;
#define MAX 210001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i + 1;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi - 1] = 1;
}

int main ()
{
  int n, m, i, j, x, y, k;
  scanf ("%d %d", &n, &m);
  for ( i = 0; i < m; i++) {
    scanf ("%d %d %d", &edge[i].a, &edge[i].b, &edge[i].w);
    //    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
  }
  for ( i = 0; i <= m; i++) p[i] = i;

  sort (edge, edge + m, comp);
  for ( i = 0; i < m; i++) {
     j = i;
    while (edge[j].w == edge[i].w && j < m) j++;

    for ( k = i; k < j; k++) {
       x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	mark[k] = 1;
      }
    }

    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	first_from[x] = first_from[y] = 0;
      }
    visit = total = 0;
    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	add_edge (x, y, edge[k].id);
	add_edge (y, x, edge[k].id);
	g[x].num = g[y].num = g[x].p = g[y].p = 0;
      }

    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (!g[x].num) bridge(x);
	if (!g[y].num) bridge(y);
      }
    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (x != y) link (x, y);
      }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      printf ("none\n");
    else if (res[i] == 1)
      printf ("any\n");
    else
      printf("at least one\n");
  }

  return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
#define MAX 100001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i + 1;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi - 1] = 1;
}

int main ()
{
  int n, m;
  cin>>n>>m;
  for (int i = 0; i < m; i++) {
    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
  }
  for (int i = 0; i <= m; i++) p[i] = i;

  sort (edge, edge + m, comp);
  for (int i = 0; i < m; i++) {
    int j = i;
    while (edge[j].w == edge[i].w && j < m) j++;

    for (int k = i; k < j; k++) {
      int x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	mark[k] = 1;
      }
    }

    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	first_from[x] = first_from[y] = 0;
      }
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	add_edge (x, y, edge[k].id);
	add_edge (y, x, edge[k].id);
	g[x].num = g[y].num = g[x].p = g[y].p = 0;
      }
    visit = 0;
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (!g[x].num) bridge(x);
	if (!g[y].num) bridge(y);
      }
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (x != y) link (x, y);
      }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      cout<<"none"<<endl;
    else if (res[i] == 1)
      cout<<"any"<<endl;
    else
      cout<<"at least one"<<endl;
  }

  return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
#define MAX 110001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i + 1;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi - 1] = 1;
}

int main ()
{
  int n, m;
  cin>>n>>m;
  for (int i = 0; i < m; i++) {
    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
  }
  for (int i = 0; i <= m; i++) p[i] = i;

  sort (edge, edge + m, comp);
  for (int i = 0; i < m; i++) {
    int j = i;
    while (edge[j].w == edge[i].w && j < m) j++;

    for (int k = i; k < j; k++) {
      int x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	mark[k] = 1;
      }
    }

    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	first_from[x] = first_from[y] = 0;
      }
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	add_edge (x, y, edge[k].id);
	add_edge (y, x, edge[k].id);
	g[x].num = g[y].num = g[x].p = g[y].p = 0;
      }
    visit = 0;
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (!g[x].num) bridge(x);
	if (!g[y].num) bridge(y);
      }
    for (int k = i; k < j; k++) if (!mark[k]){
	int x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (x != y) link (x, y);
      }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      cout<<"none"<<endl;
    else if (res[i] == 1)
      cout<<"any"<<endl;
    else
      cout<<"at least one"<<endl;
  }

  return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
#define MAX 100001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi] = 1;
}
int main ()
{
  int n, m;
  cin>>n>>m;
  for (int i = 0; i < m; i++) {
    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
    p[i] = i;
  }
  sort (edge, edge + m, comp);
  for (int i = 0; i < m; i++) {
    int j = i;
    while (edge[j].w == edge[i].w && j < m) j++;
    int flag =  0;
    for (int k = i; k < j; k++) {
      int x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	flag = 1;
      }
    }
    if (flag) continue;
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      first_from[x] = first_from[y] = 0;
    }
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      add_edge (x, y, edge[k].id);
      add_edge (y, x, edge[k].id);
      g[x].num = g[y].num = g[x].p = g[y].p = 0;
    }
    visit = 0;
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      if (!g[x].num) bridge(x);
      if (!g[y].num) bridge(y);
    }
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      if (x != y) link (x, y);
    }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      cout<<"none"<<endl;
    else if (res[i] == 1)
      cout<<"any"<<endl;
    else
      cout<<"at least one"<<endl;
  }

  return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
#define MAX 100001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i + 1;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi - 1] = 1;
}
int main ()
{
  int n, m;
  cin>>n>>m;
  for (int i = 0; i < m; i++) {
    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
  }
  for (int i = 0; i <= m; i++) p[i] = i;

  sort (edge, edge + m, comp);
  for (int i = 0; i < m; i++) {
    int j = i;
    while (edge[j].w == edge[i].w && j < m) j++;
    int flag =  0;
    for (int k = i; k < j; k++) {
      int x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	flag = 1;
      }
    }
    if (flag) continue;
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      first_from[x] = first_from[y] = 0;
    }
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      add_edge (x, y, edge[k].id);
      add_edge (y, x, edge[k].id);
      g[x].num = g[y].num = g[x].p = g[y].p = 0;
    }
    visit = 0;
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      if (!g[x].num) bridge(x);
      if (!g[y].num) bridge(y);
    }
    for (int k = i; k < j; k++) {
      int x = find_set (edge[k].a), y = find_set (edge[k].b);
      if (x != y) link (x, y);
    }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      cout<<"none"<<endl;
    else if (res[i] == 1)
      cout<<"any"<<endl;
    else
      cout<<"at least one"<<endl;
  }

  return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<cstdio>
using namespace std;
#define MAX 110001
int p[MAX];
int find_set (int x)
{
  if (p[x] != x)
    p[x] = find_set(p[x]);
  return p[x];
}
void link (int x, int y)
{
  p[y] = x;
}
struct edge_t
{
  int a, b;
  int w, id;
} edge[MAX];
int comp (edge_t a, edge_t b)
{
  return a.w < b.w;
}
int res[MAX], mark[MAX];
struct graph_t
{
  int num, low;
  int p, pi;
} g[MAX];
int first_from[MAX], next[MAX], ed[MAX], id[MAX], total;
int add_edge (int a, int b, int i)
{
  ed[++total] = b;
  next[total] = first_from[a];
  first_from[a] = total;
  id[total] = i + 1;

}
int visit;
void bridge (int x)
{
  g[x].num = ++visit;
  g[x].low = g[x].num;
  for (int i = first_from[x]; i; i = next[i]) {
    int e = ed[i];
    if (!g[e].num) {
      g[e].p = id[i];
      g[e].pi = id[i];
      bridge (e);
      g[x].low = min (g[x].low, g[e].low);
    } else {
      if (g[x].p != id[i]) {
	g[x].low = min (g[x].low, g[e].num);
      }
    }
  }
  if (g[x].p && g[x].num == g[x].low) res[g[x].pi - 1] = 1;
}

int main ()
{
  int n, m, i, j, x, y, k;
  scanf ("%d %d", &n, &m);
  for ( i = 0; i < m; i++) {
    scanf ("%d %d %d", &edge[i].a, &edge[i].b, &edge[i].w);
    //    cin>>edge[i].a>>edge[i].b>>edge[i].w;
    edge[i].id = i;
  }
  for ( i = 0; i <= m; i++) p[i] = i;

  sort (edge, edge + m, comp);
  for ( i = 0; i < m; i++) {
     j = i;
    while (edge[j].w == edge[i].w && j < m) j++;

    for ( k = i; k < j; k++) {
       x = find_set(edge[k].a), y = find_set(edge[k].b);
      if (x == y) {
	res[edge[k].id] = 2;
	mark[k] = 1;
      }
    }

    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	first_from[x] = first_from[y] = 0;
      }
    visit = total = 0;
    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	add_edge (x, y, edge[k].id);
	add_edge (y, x, edge[k].id);
	g[x].num = g[y].num = g[x].p = g[y].p = 0;
      }

    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (!g[x].num) bridge(x);
	if (!g[y].num) bridge(y);
      }
    for ( k = i; k < j; k++) if (!mark[k]){
	 x = find_set (edge[k].a), y = find_set (edge[k].b);
	if (x != y) link (x, y);
      }
    i = j - 1;
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 2)
      printf ("none\n");
    else if (res[i] == 1)
      printf ("any\n");
    else
      printf("at least one\n");
  }

  return 0;
}