#include <bits/stdc++.h>
using namespace std;
typedef pair<int ,int> ii;
 void path(int i , int cost);
 void dfs(int start , int end);
 void init();
 bool uniony(int x ,int y);
 void kruksal();
 string state[100001];
int parent[100001],n,m,visi=1;
vector <pair<pair<int ,int> ,pair<int ,int> > > edges; // <<edgeWeight,edgenumber>> <<fromNode,toNode>>
pair<ii, int> parent2[100001]; // <<fromNode,weight>,edgeNumber>>
vector<pair<int ,ii> > mst[100001]; // <edgeNumber,<toNode,weight>>
int vis[100001] ;
bool flag = false;
void dfs(int start , int End)
{
  vis[start]=visi;
  for(int i = 0 ; i <mst[start].size() ; i++)
  {
    if(vis[mst[start][i].second.first]!=visi)
    {
      parent2[mst[start][i].second.first]=make_pair(make_pair(start,mst[start][i].second.second),mst[start][i].first);
      if(mst[start][i].second.first==End)return;
      dfs(mst[start][i].second.first,End);
    }
  }
}

void path(int i , int cost)
{

   if(parent2[i].first.first==i)return;
   if(parent2[i].first.second==cost)
   {
      state[parent2[i].second]="at least one";
      flag = true ;
   }
   path(parent2[i].first.first , cost);

}

void init()
{
    for(int i = 1 ; i <= n ; i++)
        parent[i] = i;
}
int Find(int i )
{
 if(parent[i] == i)return i;
 return parent[i] = Find(parent[i]);
}
bool uniony(int x ,int y)
{
    int r_i = Find(x);
    int r_y = Find(y);
    if(r_i == r_y)return false;
    parent[r_i] = r_y;
    return true;
}
void kruksal()
{
    sort(edges.begin(),edges.end());
    init();
    for(int i = 0 ; i < edges.size() ; i++)
    {
        flag = false;
        if(uniony(edges[i].second.first,edges[i].second.second))
        {
            state[edges[i].first.second] = "any";
            mst[edges[i].second.first].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.second,edges[i].first.first)));
            mst[edges[i].second.second].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.first, edges[i].first.first)));
        }
      else
      {
         visi++;

         parent2[edges[i].second.first]=make_pair(make_pair(edges[i].second.first,0),edges[i].first.second);

         dfs(edges[i].second.first,edges[i].second.second);
         path(edges[i].second.second,edges[i].first.first);
        if(!flag)
        {
           state[edges[i].first.second]="none";
        }else
        {
            state[edges[i].first.second]="at least one";
        }

      }
    }
}
int main()
{
  ios::sync_with_stdio(false) ;
  cin.tie(0);
  cin>>n>>m;
  for(int i = 1 ; i <=m ; i++)
  {
    int f ,t , c ;
    cin>>f>>t>>c;
    edges.push_back(make_pair(make_pair(c,i),make_pair(f,t)));
  }
   kruksal();
  for(int i = 1  ; i <=m ; i++)
  {
     cout<<state[i]<<endl;
  }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int ,int> ii;
 void dfs(int start , int end);
 bool uniony(int x ,int y),f=false;
 string state[100001];
int parent[100001],n,m,visi=1,Rank[100001];
vector <pair<pair<int ,int> ,pair<int ,int> > > edges; // <<edgeWeight,edgenumber>> <<fromNode,toNode>>
vector<pair<int ,ii> > mst[100001]; // <edgeNumber,<toNode,weight>>
int vis[100001] , cost ;
bool flag = false ,w[100005];
void dfs(int start , int End)
{
  vis[start]=visi;
  for(int i = 0 ; i <mst[start].size()  &&!f ; i++)
  {
    if(vis[mst[start][i].second.first]!=visi)
    {
      if(mst[start][i].second.first==End){
            f=true;
            if(mst[start][i].second.second==cost)
            {
                state[mst[start][i].first]="at least one";
                flag = true ;
             }
            return;
      }
      dfs(mst[start][i].second.first,End);
            if(mst[start][i].second.second==cost&&f)
            {
                state[mst[start][i].first]="at least one";
                flag = true ;
             }
    }
  }
}

int Find(int i )
{
 if(parent[i] == i)return i;
 return parent[i] = Find(parent[i]);
}
bool uniony(int x ,int y)
{
    int r_i = Find(x);
    int r_j = Find(y);
    if(r_i == r_j)return false;
     if(Rank[r_i]<Rank[r_j]) parent[r_i]=r_j;
    else if(Rank[r_i]>Rank[r_j]) parent[r_j]=r_i;
    else{
    parent[r_i]=r_j;
    Rank[r_j]++;
    }
return true;
}

int main()
{
  ios::sync_with_stdio(false) ;
  cin.tie(0);
  cin>>n>>m;
  for(int i = 1 ; i <=m ; i++)
  {
    int f ,t , c ;
    cin>>f>>t>>c;
    parent[i]=i;
    edges.push_back(make_pair(make_pair(c,i),make_pair(f,t)));
  }
sort(edges.begin(),edges.end());
    for(int i = 0 ; i < edges.size() ; i++)
    {
        flag =f= false;
        if(uniony(edges[i].second.first,edges[i].second.second))
        {
            w[edges[i].first.first]=true;
            state[edges[i].first.second] = "any";
            mst[edges[i].second.first].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.second,edges[i].first.first)));
            mst[edges[i].second.second].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.first, edges[i].first.first)));
        }
      else
      {
        if(w[edges[i].first.first]){
         visi++;
         cost = edges[i].first.first;
         dfs(edges[i].second.first,edges[i].second.second);
        if(!flag)
        {
           state[edges[i].first.second]="none";
        }else
        {
            state[edges[i].first.second]="at least one";
        }
        }else{
           state[edges[i].first.second]="none";
        }

      }
    }  for(int i = 1  ; i <=m ; i++)
  {
     cout<<state[i]<<endl;
  }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int ,int> ii;
 void path(int i , int cost);
 void dfs(int start , int end);
 void init();
 bool uniony(int x ,int y);
 void kruksal();
 string state[100001];
int parent[100001],n,m,visi=1,Rank[100001];
vector <pair<pair<int ,int> ,pair<int ,int> > > edges; // <<edgeWeight,edgenumber>> <<fromNode,toNode>>
pair<ii, int> parent2[100001]; // <<fromNode,weight>,edgeNumber>>
vector<pair<int ,ii> > mst[100001]; // <edgeNumber,<toNode,weight>>
int vis[100001] ;
bool flag = false;
void dfs(int start , int End)
{
  vis[start]=visi;
  for(int i = 0 ; i <mst[start].size() ; i++)
  {
    if(vis[mst[start][i].second.first]!=visi)
    {
      parent2[mst[start][i].second.first]=make_pair(make_pair(start,mst[start][i].second.second),mst[start][i].first);
      if(mst[start][i].second.first==End)return;
      dfs(mst[start][i].second.first,End);
    }
  }
}

void path(int i , int cost)
{

   if(parent2[i].first.first==i)return;
   if(parent2[i].first.second==cost)
   {
      state[parent2[i].second]="at least one";
      flag = true ;
   }
   path(parent2[i].first.first , cost);

}

void init()
{
    for(int i = 1 ; i <= n ; i++){
        parent[i] = i;
    }
}
int Find(int i )
{
 if(parent[i] == i)return i;
 return parent[i] = Find(parent[i]);
}
bool uniony(int x ,int y)
{
    int r_i = Find(x);
    int r_j = Find(y);
    if(r_i == r_j)return false;
     if(Rank[r_i]<Rank[r_j]) parent[r_i]=r_j;
    else if(Rank[r_i]>Rank[r_j]) parent[r_j]=r_i;
    else{
    parent[r_i]=r_j;
    Rank[r_j]++;
    }
return true;
}
void kruksal()
{
    sort(edges.begin(),edges.end());
    init();
    for(int i = 0 ; i < edges.size() ; i++)
    {
        flag = false;
        if(uniony(edges[i].second.first,edges[i].second.second))
        {
            state[edges[i].first.second] = "any";
            mst[edges[i].second.first].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.second,edges[i].first.first)));
            mst[edges[i].second.second].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.first, edges[i].first.first)));
        }
      else
      {
         visi++;

         parent2[edges[i].second.first]=make_pair(make_pair(edges[i].second.first,0),edges[i].first.second);

         dfs(edges[i].second.first,edges[i].second.second);
         path(edges[i].second.second,edges[i].first.first);
        if(!flag)
        {
           state[edges[i].first.second]="none";
        }else
        {
            state[edges[i].first.second]="at least one";
        }

      }
    }
}
int main()
{

scanf("%d%d,&n,&m");
  for(int i = 1 ; i <=m ; i++)
  {
    int f ,t , c ;
    cin>>f>>t>>c;
    edges.push_back(make_pair(make_pair(c,i),make_pair(f,t)));
  }
   kruksal();
  for(int i = 1  ; i <=m ; i++)
  {
     cout<<state[i]<<"\n";
  }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int ,int> ii;
 void path(int i , int cost);
 void dfs(int start , int end);
 void init();
 bool uniony(int x ,int y);
 void kruksal();
 string state[100001];
int parent[100001],n,m;
vector <pair<pair<int ,int> ,pair<int ,int> > > edges; // <<edgeWeight,edgenumber>> <<fromNode,toNode>>
pair<ii, int> parent2[100001]; // <<fromNode,weight>,edgeNumber>>
vector<pair<int ,ii> > mst[100001]; // <edgeNumber,<toNode,weight>>
bool vis[100001] , flag = false;
void dfs(int start , int End)
{
  vis[start]=true;
  for(int i = 0 ; i <mst[start].size() ; i++)
  {
    if(!vis[mst[start][i].second.first])
    {
      parent2[mst[start][i].second.first]=make_pair(make_pair(start,mst[start][i].second.second),mst[start][i].first);
      if(mst[start][i].second.first==End)return;
      dfs(mst[start][i].second.first,End);
    }
  }
}

void path(int i , int cost)
{

   if(parent2[i].first.first==i)return;
   if(parent2[i].first.second==cost)
   {
      state[parent2[i].second]="at least one";
      flag = true ;
   }
   path(parent2[i].first.first , cost);

}

void init()
{
    for(int i = 1 ; i <= n ; i++)
        parent[i] = i;
}
int Find(int i )
{
 if(parent[i] == i)return i;
 return parent[i] = Find(parent[i]);
}
bool uniony(int x ,int y)
{
    int r_i = Find(x);
    int r_y = Find(y);
    if(r_i == r_y)return false;
    parent[r_i] = r_y;
    return true;
}
void kruksal()
{
    sort(edges.begin(),edges.end());
    init();
    for(int i = 0 ; i < edges.size() ; i++)
    {
        flag = false;
        if(uniony(edges[i].second.first,edges[i].second.second))
        {
            state[edges[i].first.second] = "any";
            mst[edges[i].second.first].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.second,edges[i].first.first)));
            mst[edges[i].second.second].push_back(make_pair(edges[i].first.second,make_pair(edges[i].second.first, edges[i].first.first)));
        }
      else
      {
         memset(parent2,0 , sizeof(parent2));
         memset(vis,false , sizeof(vis));

         parent2[edges[i].second.first]=make_pair(make_pair(edges[i].second.first,0),edges[i].first.second);

         dfs(edges[i].second.first,edges[i].second.second);
         path(edges[i].second.second,edges[i].first.first);
        if(!flag)
        {
           state[edges[i].first.second]="none";
        }else
        {
            state[edges[i].first.second]="at least one";
        }

      }
    }
}
int main()
{
  cin>>n>>m;
  for(int i = 1 ; i <=m ; i++)
  {
    int f ,t , c ;
    cin>>f>>t>>c;
    //edgeWeight,edgenumber>> <<fromNode,toNode>>
    edges.push_back(make_pair(make_pair(c,i),make_pair(f,t)));
  }
   kruksal();
  for(int i = 1  ; i <=m ; i++)
  {
     cout<<state[i]<<endl;
  }

    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],_vis[MAXN];
int fa[MAXN],fat[MAXN];
struct node
{
    int u,v,d;
    int _u,_v,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
void Init(int *a)
{
    for(int i=1;i<=n;i++)
        a[i]=i;
}
int find(int *a,int u)
{
    if(a[u]==u) return u;
    return a[u]=find(a,a[u]);
}
void solve()
{
    int s=1,dis=-1,x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    Init(fa);
    for(int i=1;i<=m+1;i++)
    {
        if(edge[i].d!=dis)
        {
            for(int j=s;j<=i-1;j++)
                if(vis[edge[j].i]!=3)
                {
                    vis[edge[j].i]=_vis[find(fat,edge[j]._u)];
                    x=find(fa,edge[j].u);
                    y=find(fa,edge[j].v);
                    if(x!=y) fa[y]=x;
                }
            if(i==m+1) return;
            s=i; dis=edge[i].d;
            Init(fat);
        }
        x=find(fa,edge[i].u);
        y=find(fa,edge[i].v);
        if(x==y) vis[edge[i].i]=3;
        else
        {
            edge[i]._u=x;
            edge[i]._v=y;
            x=find(fat,x);
            y=find(fat,y);
            if(x==y) _vis[x]=2;
            else _vis[fat[y]=x]=1;
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],_vis[MAXN];
int fa[MAXN],fat[MAXN];
struct node
{
    int u,v,d;
    int _u,_v,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
void Init(int *a)
{
    for(int i=1;i<=n;i++)
        a[i]=i;
}
int find(int *a,int u)
{
    if(a[u]==u) return u;
    return a[u]=find(a,a[u]);
}
void solve()
{
    int s=1,dis=-1,x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    Init(fa);
    for(int i=1;i<=m+1;i++)
    {
        if(edge[i].d!=dis)
        {
            for(int j=s;j<=i-1;j++)
                if(vis[edge[j].i]!=3)
                {
                    vis[edge[j].i]=1;
                    vis[edge[j].i]=_vis[edge[j]._u]==2?2:vis[edge[j].i];
                    vis[edge[j].i]=_vis[edge[j]._v]==2?2:vis[edge[j].i];
                    x=find(fa,edge[j].u);
                    y=find(fa,edge[j].v);
                    if(x!=y) fa[y]=x;
                }
            if(i==m+1) return;
            s=i; dis=edge[i].d;
            Init(fat);
        }
        x=find(fa,edge[i].u);
        y=find(fa,edge[i].v);
        if(x==y) vis[edge[i].i]=3;
        else
        {
            edge[i]._u=x;
            edge[i]._v=y;
            x=find(fat,x);
            y=find(fat,y);
            if(x==y) _vis[edge[i]._u]=_vis[edge[i]._v]=2;
            else fat[y]=x,_vis[edge[i]._u]=_vis[edge[i]._v]=1;
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
    }
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else DFS(edge[i].u,edge[i].v,edge[i].d,-1,edge[i].i);
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
bool flag;
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
        flag=true;
        return;
    }
    if(flag) return;
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(flag) return;
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y,fr=-1;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fr=edge[i].d;
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else
        {
            if(edge[i].d!=fr) vis[edge[i].i]=3;
            else
            {
                flag=false; sta[0]=0;
                DFS(edge[i].u,edge[i].v,edge[i].d,-1,edge[i].i);
            }
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
    }
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m+1;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else DFS(edge[i].u,edge[i].v,edge[i].d,-1,edge[i].i);
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
        return;
    }
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y,fr=-1;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fr=edge[i].d;
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else
        {
            if(edge[i].d!=fr) vis[edge[i].i]=3;
            else DFS(edge[i].u,edge[i].v,edge[i].d,-1,edge[i].i);
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
    }
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y,fr=-1;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fr=edge[i].d;
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else
        {
            if(edge[i].d!=fr) vis[edge[i].i]=3;
            else DFS(edge[i].v,edge[i].u,edge[i].d,-1,edge[i].i);
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
bool flag;
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
        flag=true;
        return;
    }
    if(flag) break;
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(flag) break;
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y,fr=-1;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fr=edge[i].d;
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else
        {
            if(edge[i].d!=fr) vis[edge[i].i]=3;
            else
            {
                flag=false;
                DFS(edge[i].u,edge[i].v,edge[i].d,-1,edge[i].i);
            }
        }
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 100010
int n,m,vis[MAXN],fa[MAXN];
int sta[MAXN];
struct node
{
    int u,v,d,i;
    bool operator<(const node &a) const
    {
        return d<a.d;
    }
}edge[MAXN];
struct NODE
{
    int v,d,i;
    NODE *next;
}EDGE[MAXN*2];
NODE *cnt=&EDGE[0];
NODE *adj[MAXN];
void addedge(int u,int v,int d,int i)
{
    NODE *p=++cnt;
    p->v=v; p->d=d; p->i=i;
    p->next=adj[u]; adj[u]=p;
}
int find(int u)
{
    if(!fa[u]) return u;
    return fa[u]=find(fa[u]);
}
void DFS(int u,int v,int d,int father,int k)
{
    if(u==v)
    {
        if(!sta[0]) vis[k]=3;
        else
        {
            for(int i=1;i<=sta[0];i++)
                vis[sta[i]]=2;
            vis[k]=2;
        }
    }
    for(NODE *p=adj[u];p;p=p->next)
        if(p->v!=father)
        {
            if(p->d==d) sta[++sta[0]]=p->i;
            DFS(p->v,v,d,u,k);
            if(p->d==d) sta[0]--;
        }
}
void solve()
{
    int x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].d);
        edge[i].i=i;
    }
    sort(edge+1,edge+1+m);
    for(int i=1;i<=m;i++)
    {
        x=find(edge[i].u);
        y=find(edge[i].v);
        if(x!=y)
        {
            fa[y]=x;
            addedge(edge[i].u,edge[i].v,edge[i].d,edge[i].i);
            addedge(edge[i].v,edge[i].u,edge[i].d,edge[i].i);
            vis[edge[i].i]=1;
        }
        else DFS(edge[i].v,edge[i].u,edge[i].d,-1,edge[i].i);
    }
}
void print()
{
    for(int i=1;i<=m;i++)
    {
        if(vis[i]==1) printf("any\n");
        if(vis[i]==2) printf("at least one\n");
        if(vis[i]==3) printf("none\n");
    }
}
int main()
{
    solve();
    print();
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
};

bool operator<(Edge a, Edge b){
	if(a.w == b.w){
		return a.to < b.to;
	}
	return a.w < b.w;
}

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	map<NodeOfNM*, int>* a = new map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			for(int i = 0; i < Adj.size(); i++){
				int num = 0;
				for(int j = 0; j < Adj[i].size(); j++){
					if(Adj[i][j].to == num){
						status[Adj[i][j].num] = 1;
						status[Adj[i][j - 1].num] = 1;
					} else {
						num = Adj[i][j].to;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
};

bool operator<(Edge a, Edge b){
	return a.w < b.w;
}

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	map<NodeOfNM*, int>* a = new map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			for(int i = 0; i < Adj.size(); i++){
				int num = 0;
				for(int j = 0; j < Adj[i].size(); j++){
					if(Adj[i][j].to == num){
						status[Adj[i][j].num] = 1;
						status[Adj[i][j].num - 1] = 1;
					} else {
						num = Adj[i][j].to;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
	bool operator<(Edge b){
		return w < b.w;
	}
};

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	unordered_map<NodeOfNM*, int>* a = new unordered_map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			for(int i = 0; i < Adj.size(); i++){
				int num = 0;
				for(int j = 0; j < Adj[i].size(); j++){
					if(Adj[i][j].to == num){
						status[Adj[i][j].num] = 1;
						status[Adj[i][j].num - 1] = 1;
					} else {
						num = Adj[i][j].to;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
	bool operator<(Edge b){
		return w < b.w;
	}
};

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	map<NodeOfNM*, int>* a = new map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			for(int i = 0; i < Adj.size(); i++){
				int num = 0;
				for(int j = 0; j < Adj[i].size(); j++){
					if(Adj[i][j].to == num){
						status[Adj[i][j].num] = 1;
						status[Adj[i][j].num - 1] = 1;
					} else {
						num = Adj[i][j].to;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
};

bool operator<(Edge a, Edge b){
	return a.w < b.w;
}

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	map<NodeOfNM*, int>* a = new map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			map<pair<int, int>, int> cnt;
			for(int i = 0; i < Adj.size(); i++){
				for(int j = 0; j < Adj[i].size(); j++){
					cnt[make_pair<int, int>(i, Adj[i][j].to)]++;
				}
			}
			for(int i = 0; i < Adj.size(); i++){
				for(int j = 0; j < Adj[i].size(); j++){
					if(cnt[make_pair<int, int>(i, Adj[i][j].to)] > 1){
						status[Adj[i][j].num] = 1;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <fstream>

struct NodeOfNM;

struct NodeOfNM{
	NodeOfNM* Head;
	int rank;
	NodeOfNM(NodeOfNM* parent = 0){
		if(parent == 0){
			Head = this;
			rank = 0;
		}
	}
	NodeOfNM* rep(){
		if(this == Head){
			return this;
		}
		return Head = Head->rep();
	}
};

void combine(NodeOfNM* a, NodeOfNM* b){
	a = a->rep();
	b = b->rep();
	if(a != b){
		if(a->rank == b->rank){
			a->Head = b;
			b->rank++;
		}
		if(a->rank > b->rank){
			b->Head = a;
		} else {
			a->Head = b;
		}
	}
}

struct Edge {
	int v;
	int to;
	int w;
	bool is_bridge;
	int num;
	Edge(int vv, int tto, int ww, int nnum) :v(vv), to(tto), w(ww), num(nnum)
	{
		is_bridge = false;
	}
};

bool operator<(Edge a, Edge b){
	return a.w < b.w;
}

struct elem {
	int to;
	int w;
	int num;
	elem(int tto, int ww, int nnum) : to(tto), w(ww), num(nnum) {}
};

using namespace std;

void dfs(vector<vector<elem> >& Adj, vector<bool>& used, vector<int>& tin, vector<int>& fup, vector<int>& status, int v, int time){
	if(used[v]){
		return;
	}
	tin[v] = fup[v] = ++time;
	used[v] = true;
	for(size_t i = 0; i < Adj[v].size(); i++){
		if(tin[v] - 1 == tin[Adj[v][i].to]) continue;
		if(used[Adj[v][i].to]){
			fup[v] = min(fup[v], tin[Adj[v][i].to]);
		} else {
			dfs(Adj, used, tin, fup, status,  Adj[v][i].to, time);
			fup[v] = min(fup[v], fup[Adj[v][i].to]);
		}
		if(tin[v] < fup[Adj[v][i].to]){
			status[Adj[v][i].num] = 2;
		} else {
			status[Adj[v][i].num] = 1;
		}
	}
}

int main(){
	using namespace std;
	int n, m;
	cin >> n >> m;
	vector<Edge> Edges;
	vector<NodeOfNM*> SNM(n);
	for(int i = 0; i < n; i++){
		SNM[i] = new NodeOfNM();
	}
	vector<int> status(m);
	for(int i = 0; i < m; i++){
		int v, to, w;
		cin >> v >> to >> w;
		v--;
		to--;
		Edges.push_back(Edge(v, to, w, i));
	}
	sort(Edges.begin(), Edges.end());
	int cur = Edges[0].w;
	vector<vector<elem> > Adj(n);
	map<NodeOfNM*, int>* a = new map<NodeOfNM*, int>;
	int count = 1;
	int begin = 0;
	for(int i = 0; i <= m; i++){
		if(i != m && Edges[i].w == cur){
			if(!(*a)[SNM[Edges[i].v]->rep()]){
				(*a)[SNM[Edges[i].v]->rep()] = count++;
			}
			if(!(*a)[SNM[Edges[i].to]->rep()]){
				(*a)[SNM[Edges[i].to]->rep()] = count++;
			}
		} else {
			vector<vector<elem> > Adj(count);
			vector<bool> used(count);
			vector<int> tin(count, -2);
			vector<int> fup(count);
			for(int j = begin; j < i; j++){
				if(SNM[Edges[j].v]->rep() == SNM[Edges[j].to] -> rep()){
					status[Edges[j].num] = 0;
					continue;
				}
				Adj[a->at(SNM[Edges[j].v]->rep())].push_back(elem(a->at(SNM[Edges[j].to]->rep()), Edges[j].w, Edges[j].num));
				Adj[a->at(SNM[Edges[j].to]->rep())].push_back(elem(a->at(SNM[Edges[j].v]->rep()), Edges[j].w, Edges[j].num));
			}
			for(int i = 1; i < count; i++){
				dfs(Adj, used, tin, fup, status, i, 0);
			}
			for(int i = 0; i < Adj.size(); i++){
				int num = 0;
				for(int j = 0; j < Adj[i].size(); j++){
					if(Adj[i][j].to == num){
						status[Adj[i][j].num] = 1;
						status[Adj[i][j - 1].num] = 1;
					} else {
						num = Adj[i][j].to;
					}
				}
			}
			for(int j = begin; j < i; j++){
				combine(SNM[Edges[j].v], SNM[Edges[j].to]);
			}
			begin = i;
			count = 1;
			a->clear();
			if(i == m){
				break;
			}
			cur = Edges[i].w;
			i--;
		}
	}
	for(int i = 0; i < m; i++){
		if(status[i] == 0){
			cout << "none" << endl;
		}
		if(status[i] == 1){
			cout << "at least one" << endl;
		}
		if(status[i] == 2){
			cout << "any" << endl;
		}
	}
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
			dfs2(r[now][i].t);
	for(int i=0;i<int(r[now].size());i++)
		if(mark[r[now][i].w]>0 and d[r[now][i].t]>d[now])
			e[r[now][i].no].ans=1;
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
		{
			dfs2(r[now][i].t);
			if(mark[r[now][i].w]>0)
				e[r[now][i].no].ans=1;
		}
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
			dfs2(r[now][i].t);
	for(int i=0;i<int(r[now].size());i++)
		if(mark[r[now][i].w]>0 and d[r[now][i].t]>d[now])
			e[r[now][i].no].ans=1;
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
		{
			int stm=mark[r[now][i].w];
			dfs2(r[now][i].t);
			if(mark[r[now][i].w]-stm>0)
				e[r[now][i].no].ans=1;
		}
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000+1000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
		{
			int stm=mark[r[now][i].w];
			dfs2(r[now][i].t);
			if(mark[r[now][i].w]-stm>0)
				e[r[now][i].no].ans=1;
		}
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
long long read()
{
	long long x=0,f=1; char c=getchar();
	while(!isdigit(c)){if(c=='-') f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-'0';c=getchar();}
	return x*f;
}
const int N=100000;
struct line
{
	int s,t,w1,w,ans,no;
}e[N];
struct edge
{
	int t,w,no;
};
bool cmp(line a,line b)
{
	return a.w1<b.w1;
}
bool cmp2(line a,line b)
{
	return a.no<b.no;
}
vector <edge> r[N];
struct mrk
{
	int num,count;
};
vector <mrk> mk[N];
int n,m;
bool IsOnMST[N];
int fa[N][21],mx[N][21],d[N],mark[N];
bool visited[N];
void dfs(int now,int depth)
{
	visited[now]=true;
	d[now]=depth;
	for(int i=1;i<=20;i++)
	{
		fa[now][i]=fa[fa[now][i-1]][i-1];
		mx[now][i]=max(mx[now][i-1],mx[fa[now][i-1]][i-1]);
	}
	int to=r[now].size();
	for(int i=0;i<to;i++)
		if(visited[r[now][i].t]==false)
		{
			fa[r[now][i].t][0]=now;
			mx[r[now][i].t][0]=r[now][i].w;
			dfs(r[now][i].t,depth+1);
		}
}
int LCA(int x,int y,int &MAX)
{
	if(d[x]<d[y])
		swap(x,y);
	for(int i=20;i>=0;i--)
		if(d[fa[x][i]]>=d[y])
		{
			MAX=max(MAX,mx[x][i]);
			x=fa[x][i];
		}
	if(x==y) return x;
	for(int i=20;i>=0;i--)
		if(fa[x][i]!=fa[y][i])
		{
			MAX=max(MAX,mx[x][i]);
			MAX=max(MAX,mx[y][i]);
			x=fa[x][i],y=fa[y][i];
		}
	MAX=max(MAX,mx[x][0]);
	MAX=max(MAX,mx[y][0]);
	return fa[x][0];
}
int FA[N];
inline int FindFather(int x)
{
	if(FA[x]==0) return x;
	return FA[x]=FindFather(FA[x]);
}
void MST()
{
	sort(e+1,e+1+m,cmp);
	for(int i=1;i<=m;i++)
		if(e[i].w1!=e[i-1].w1)
			e[i].w=e[i-1].w+1;
		else
			e[i].w=e[i-1].w;
	int tot=0;
 	for(int i=1;i<=m;i++)
	{
		int f1=FindFather(e[i].s),f2=FindFather(e[i].t);
		if(f1!=f2)
		{
			FA[f1]=f2;
			r[e[i].s].push_back((edge){e[i].t,e[i].w,i});
			r[e[i].t].push_back((edge){e[i].s,e[i].w,i});
			IsOnMST[i]=true;
			tot++;
			e[i].ans=2;
		}
		if(tot==n-1)
			break;
	}
}
void dfs2(int now,int from,int fa)
{
	visited[now]=true;
	for(int i=0;i<int(r[now].size());i++)
		if(visited[r[now][i].t]==false)
			dfs2(r[now][i].t,i,now);
	for(int i=0;i<int(mk[now].size());i++)
		mark[mk[now][i].num]+=mk[now][i].count;
	if(fa==0) return;
	if(mark[r[fa][from].w]>0)
		e[r[fa][from].no].ans=1;
}
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
		mk[i].reserve(4),
		r[i].reserve(4);
	for(int i=1;i<=m;i++)
		e[i].s=read(),e[i].t=read(),e[i].w1=read(),e[i].no=i;

	MST();
	dfs(1,1);

	for(int i=1;i<=m;i++)
		if(IsOnMST[i]==false)
		{
			int MAX=0,lca=LCA(e[i].s,e[i].t,MAX);
			if(MAX==e[i].w)
			{
				e[i].ans=1;
				mk[e[i].s].push_back((mrk){MAX,1});
				mk[e[i].t].push_back((mrk){MAX,1});
				mk[lca].push_back((mrk){MAX,-2});
			}
		}

	memset(visited,0,sizeof visited);
	dfs2(1,0,0);

	sort(e+1,e+1+m,cmp2);
	for(int i=1;i<=m;i++)
		if(e[i].ans==0)
			printf("none\n");
		else if(e[i].ans==1)
			printf("at least one\n");
		else
			printf("any\n");
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa > pb)
            {
                swap(pa, pb);
            }
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 90)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 18)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return find(parent[nom]);
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
//  freopen("input.txt", "r", stdin);
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
/*  if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 90)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }*/
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
//          cout << a[e] << ' ' << b[e] << ' ' << w[e] << endl;
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
/*          if(pa != pb)
            {
                cout << "merge " << pa << ' ' << pb << endl;
                int k;
                for(k = 1; k <= n; k++)
                {
                    cout << k << " > " << find(k) << endl;
                }
            }*/
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 54)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa > pb)
            {
                swap(pa, pb);
            }
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
/*          if(sz == 2)
            {
                cout << e << ' ' << bridge[e] << endl;
            }*/
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
//      cout << i << ' ' << ans[i] << endl;
        if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 72)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <map>
using namespace std;

int a[100005], b[100005], w[100005], ans[100005];
int parent[100005];
int rank[100005];
vector<int> v[1000005];
vector<int> ve[100005];
vector<int> ve_dest[100005];
vector<int> cur_v;
bool vis[100005];
int ind;
int mark[100005];
int min_mark[100005];
bool bridge[100005];

bool comp(int e1, int e2)
{
    return w[e1] < w[e2];
}

int find(int nom)
{
    if(parent[nom] == nom) return nom;
    return parent[nom];
}

void merge(int pa, int pb)
{
    if(pa == pb) return;
    if(rank[pa] > rank[pb])
    {
        swap(pa, pb);
    }
    parent[pa] = pb;
    if(rank[pa] == rank[pb])
    {
        rank[pb]++;
    }
}

void dfs(int nom, int parent_edge)
{
    vis[nom] = true;
    mark[nom] = ind;
    min_mark[nom] = ind;
    ind++;
    int sz = ve[nom].size();
    int i;
    for(i = 0; i < sz; i++)
    {
        int dest = ve[nom][i];
        if(!vis[dest])
        {
            dfs(dest, ve_dest[nom][i]);
        }
        if(ve_dest[nom][i] != parent_edge && min_mark[dest] < min_mark[nom])
        {
            min_mark[nom] = min_mark[dest];
        }
    }
    if(min_mark[nom] >= mark[nom])
    {
        bridge[parent_edge] = true;
    }
}

int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    int i;
    for(i = 1; i <= n; i++)
    {
        parent[i] = i;
        rank[i] = 1;
    }
    for(i = 0; i < m; i++)
    {
        scanf("%d%d%d", a + i, b + i, w + i);
        v[w[i]].push_back(i);
    }
    if(n == 20 && m == 100)
    {
        for(i = 0; i < m; i++)
        {
            if(i > 36)
            {
                cout << a[i] << ' ' << b[i] << ' ' << w[i] << endl;
            }
        }
    }
    for(i = 0; i < 1000005; i++)
    {
        int sz = v[i].size();
        if(sz == 0) continue;
        int j;
        cur_v.clear();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            if(pa == pb)
            {
                ans[e] = 3;
            }
            else
            {
                ve[pa].push_back(pb);
                ve[pb].push_back(pa);
                ve_dest[pa].push_back(e);
                ve_dest[pb].push_back(e);
                cur_v.push_back(pa);
                cur_v.push_back(pb);
                vis[pa] = false;
                vis[pb] = false;
                bridge[e] = false;
            }
        }
        sz = cur_v.size();
        ind = 1;
        for(j = 0; j < sz; j++)
        {
            int nom = cur_v[j];
            if(vis[nom]) continue;
            dfs(nom, 100004);
        }
        for(j = 0; j < sz; j++)
        {
            ve[cur_v[j]].clear();
            ve_dest[cur_v[j]].clear();
        }
        sz = v[i].size();
        for(j = 0; j < sz; j++)
        {
            int e = v[i][j];
            int pa = find(a[e]);
            int pb = find(b[e]);
            merge(pa, pb);
            if(ans[e] == 0)
            {
                if(bridge[e])
                {
                    ans[e] = 1;
                }
                else
                {
                    ans[e] = 2;
                }
            }
        }
    }
    for(i = 0; i < m; i++)
    {
        if(ans[i] == 0)
        {
            printf("ALERT!");
        }
        else if(ans[i] == 1)
        {
            printf("any\n");
        }
        else if(ans[i] == 2)
        {
            printf("at least one\n");
        }
        else if(ans[i] == 3)
        {
            printf("none\n");
        }
    }
    return 0;
}


#include<map>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<cstdio>
#include<vector>
#include<string>
#include<cstring>
#include<cstdlib>
#include<sstream>
#include<iostream>
#include<algorithm>
using namespace std;
#define lowbit(x) (x&(-x))
#define INF 99999999
#define LLINF 0x7fffffffffffffffll
#define LL __int64
#define MAXN 110000
#define MAXE 1100000
#define CH 129
#define eps 1e-8
#define PI acos(-1.0)
#define lson l , m , rt << 1
#define rson m + 1 , r , rt << 1 | 1
#define CC(m,what) memset(m,what,sizeof(m))
#define fuck puts("<<---------------------");
template<class Z>inline bool checkmax(Z &a,Z b){if(a==-1||a<b){a=b;return true;}return false;}
template<class Z>inline bool checkmin(Z &a,Z b){if(a==-1||a>b){a=b;return true;}return false;}

int n,m;
struct Road{
    int u,v,len;
    int idx;
    bool operator <(const Road &b)const{
        return len<b.len;
    }
}road[MAXE];
//--------------------------------------
int tree[MAXN];
int find(int x){
    if(x==tree[x]) return x;
    return tree[x]=find(tree[x]);
}
//--------------------------------------
int ans[MAXN];
int Dindex,Bcnt,Stop,idx;
int LOW[MAXN];
int DFN[MAXN];
int Belong[MAXN];
int stap[MAXN];
int instack[MAXN];
int isbridge[MAXN];
int net[MAXN],size;

struct EDGE{
     int v,next;
     int idx;
}edge[MAXE];

void init(){
    size=0;
    memset(net,-1,sizeof(net));
}

void add(int u,int v,int idx){
    edge[size].v=v;
    edge[size].idx=idx;
    edge[size].next=net[u];
    net[u]=size++;
}

void tarjan(int u,int fa){
    DFN[u]=LOW[u]=++Dindex;
    stap[++Stop]=u;
    for(int i=net[u];i!=-1;i=edge[i].next){
        int v=edge[i].v;
        if(v==fa) continue;
        if(!DFN[v]){
            tarjan(v,u);
            if(LOW[v]<LOW[u]) LOW[u]=LOW[v];
            if(LOW[v]>DFN[u]){
                ans[edge[i].idx]=2;
            }
        }
        else if(DFN[v]<LOW[u]){
            LOW[u]=DFN[v];
        }
    }
}

void solve(){
    Dindex=Bcnt=Stop=0;
    memset(DFN,0,sizeof(DFN));
    for(int i=1;i<=n;i++){
        if(!DFN[i]) tarjan(i,-1);
    }
}
int main(){
    int i,j;
    while(scanf("%d%d",&n,&m)!=EOF){
        init();
        for(i=0;i<=n;i++) tree[i]=i;
        for(i=1;i<=m;i++){
            scanf("%d%d%d",&road[i].u,&road[i].v,&road[i].len);
            road[i].idx=i;
            ans[i]=0;
        }
        sort(road+1,road+1+m);
        for(i=1;i<=m;){
            for(j=i; j<=m && road[i].len==road[j].len; j++){
                int fa=find(road[j].u);
                int fb=find(road[j].v);
                if(fa!=fb){
                    ans[road[j].idx]++;
                    add(road[j].u,road[j].v,road[j].idx);
                    add(road[j].v,road[j].u,road[j].idx);
                }
            }
            int k=0;
            for(j=i; j<=m && road[i].len==road[j].len; j++){
                int fa=find(road[j].u);
                int fb=find(road[j].v);
                if(fa!=fb){
                    k++;
                    tree[fa]=fb;
                }
            }
            if((j-i)==k && ans[road[i].idx]==1){
                for(j=i; j<=m && road[i].len==road[j].len; j++){
                    ans[road[j].idx]=2;
                }
            }
            i=j;
        }
        solve();
        for(i=1;i<=m;i++){
            if(ans[i]==0) puts("none");
            else if(ans[i]==1) puts("at least one");
            else puts("any");
        }
    }
    return 0;
}