#include <iostream>
#include <cstdio>
#include <vector>
#include <array>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <random>
#include <bitset>
#include <cassert>
#include <tuple>
#include <list>
#include <iterator>
#include <unordered_set>
#include <unordered_map>
#include <numeric>

using namespace std;

typedef long long ll;
typedef long double ld;

template<class htpe, class cmp>
using heap = priority_queue<htpe, vector<htpe>, cmp>;

template<class htpe>
using min_heap = heap<htpe, greater<htpe> >;

template<class htpe>
using max_heap = heap<htpe, less<htpe> >;

#define mp make_pair
#define pb push_back
#define mt make_tuple
#define ff first
#define ss second

#define forn(i, n) for (int i = 0; i < ((int)(n)); ++i)
#define forrn(i, s, n) for (int i = (int)(s); i < ((int)(n)); ++i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

#define PYMOD(a, m) ((((a) % (m)) + (m)) % (m))

const int INF = 1791791791;
const ll INFLL = 1791791791791791791ll;

template<size_t buf_size>
class FastInput {
    char buf[buf_size];
    size_t clen = 0;
    size_t cpos = 0;
    FILE *infl;
    bool cl = false;
public:
    inline bool isEof() {
        if (cpos == clen) {
            cpos = 0;
            clen = fread(buf, 1ul, buf_size, infl);
            return clen == 0;
        } else
            return false;
    }

    inline int nextChar() {
        return isEof() ? -1 : buf[cpos++];
    }

    inline bool seekEof() {
        int res = nextChar();
        while (res == ' ' || res == '\n')
            res = nextChar();
        if (res == -1)
            return true;
        assert(cpos != 0);
        cpos--;
        return false;
    }

    inline char readChar() {
        int res = nextChar();
        while (res == ' ' || res == '\n')
            res = nextChar();
        assert(res != -1);
        return (char)res;
    }

    inline void copyWord(char *wbuf) {
        int w = readChar();
        while (w != ' ' && w != '\n' && w != -1) {
            *(wbuf++) = (char)w;
            w = nextChar();
        }
    }

    inline string readString() {
        int w = readChar();
        std::string res;
        while (w != ' ' && w != '\n' && w != -1) {
            res.pb((char)w);
            w = nextChar();
        }
        return res;
    }

    template<class rint_t = int>
    rint_t readInt() {
        int sgn = readChar();
        rint_t res = 0, b = 1;
        if (sgn == '-')
            b = -1;
        else if (sgn != '+')
            res = sgn - '0';
        int w = nextChar();
        while (w != ' ' && w != '\n' && w != -1) {
            res *= 10;
            res += w - '0';
            w = nextChar();
        }
        return b * res;
    }

    FastInput(const string& filename = "stdin") {
        cl = filename != "stdin";
        if (filename == "stdin")
            infl = stdin;
        else
            infl = fopen(filename.c_str(), "r");
    }

    ~FastInput() {
        if (cl)
            fclose(infl);
    }
};

template<size_t buf_size>
class FastOutput {
    char buf[buf_size];
    int cpos = 0;
    FILE *outfl;
    bool lf, cl;
public:
    inline void flush() {
        fwrite(buf, cpos, 1, outfl);
        cpos = 0;
    }

    inline void putChar(char c) {
        if (cpos == buf_size)
            flush();
        buf[cpos++] = c;
    }

    inline void putBuf(const char *to_w) {
        while (*to_w != 0)
            putChar(*(to_w++));
    }

    inline void writeString(const string &s, const char *after = " ") {
        putBuf(s.c_str());
        putBuf(after);
    }

    template<class rint_t>
    inline void writeInt(rint_t x, const char *after = " ") {
        char to_w[100];
        int cur = 0;
        if (x == 0)
            putBuf("0");
        else {
            if (x < 0) {
                putChar('-');
                x = -x;
            }
            while (x > 0) {
                to_w[cur++] = (x % 10) + '0';
                x /= 10;
            }
            reverse(to_w, to_w + cur);
            to_w[cur] = 0;
            putBuf(to_w);
        }
        putBuf(after);
    }

    inline void writeEndl() {
        putChar('\n');
#ifdef LOCAL
        if (lf)
            flush();
#endif
    }

    FastOutput(const string &filename = "stdout", bool lflush = true) {
        lf = lflush;
        cl = filename != "stdout";
        if (filename == "stdout")
            outfl = stdout;
        else
            outfl = fopen(filename.c_str(), "w");
        memset(buf, 0, sizeof(buf));
    }

    ~FastOutput() {
        flush();
        if (cl)
            fclose(outfl);
    }
};

FastInput<4096> fin;
FastOutput<4096> fout;

vector<int> solve(vector<int> t) {
    int n = t.size();
    vector<int> dp(n + 1);
    dp[0] = 0;
    forn(i, n) {
        dp[i + 1] = dp[i] + 20;
        auto it = lower_bound(all(t), t[i] - 89);
        dp[i + 1] = min(dp[i + 1], dp[it - t.begin()] + 50);
        it = lower_bound(all(t), t[i] - 1439);
        dp[i + 1] = min(dp[i + 1], dp[it - t.begin()] + 120);
    }
    return dp;
}

int main() {
    // Code here:

    int n = fin.readInt();
    vector<int> t;

    forn(i,n) t.pb(fin.readInt());

    auto dp = solve(t);

    fout.writeInt(dp[1], "\n");
    forrn(i, 2, n + 1)
        fout.writeInt(dp[i] - dp[i - 1], "\n");

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> S;
int an[N];

void dfs(int u, int fa) {
    pre[u] = low[u] = ++dfs_clock;
    S.push(u);
    bool first = true;
    int sz = G[u].size();
    for (int i = 0; i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first) {
            first = false;
            continue;
        }
        if (!pre[v]) {
            dfs(v, u);
            low[u] = min(low[u], low[v]);
        } else  {
            low[u] = min(low[u], pre[v]);
        }
    }
    if (low[u] == pre[u]) {
        ecc_cnt++;
        while (true) {
            int v = S.top(); S.pop();
            eccno[v] = ecc_cnt;
        //    cout<<v<<" ";
            if (v == u) break;
        }
       // cout<<endl;
    }
}
int n,m;
void find_ecc() {
    dfs_clock = ecc_cnt = 0;
    memset(eccno, 0, sizeof(eccno));
    memset(pre, 0, sizeof(pre));
    for (int i = 1; i <= n; i++)
        if (!pre[i]) dfs(i, -1);
    for (int i = 1; i <= n; i++) {
        for (int j = 0; j < G[i].size(); j++) {
            int v = G[i][j].v;
            if (eccno[i] != eccno[v]) an[G[i][j].id] = 2;
        }
    }
}

struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     for (int i = 0; i <= n; i++) G[i].clear();
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
       // cout<<i<<" "<<j<<endl;
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
             //   cout<<Eg[k].id<<endl;
                G[u].push_back(node(v,Eg[k].id));
                G[v].push_back(node(u,Eg[k].id));
                an[Eg[k].id] = 1;
            }
        }
        find_ecc();
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> S;
int an[N];

void dfs(int u, int fa) {
    pre[u] = low[u] = ++dfs_clock;
    S.push(u);
    bool first = true;
    int sz = G[u].size();
    for (int i = 0; i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first) {
            first = false;
            continue;
        }
        if (!pre[v]) {
            dfs(v, u);
            low[u] = min(low[u], low[v]);
        } else  {
            low[u] = min(low[u], pre[v]);
        }
    }
    if (low[u] == pre[u]) {
        ecc_cnt++;
        while (true) {
            int v = S.top(); S.pop();
            eccno[v] = ecc_cnt;
        //    cout<<v<<" ";
            if (v == u) break;
        }
       // cout<<endl;
    }
}
int n,m;
void find_ecc() {
    dfs_clock = ecc_cnt = 0;
    memset(eccno, 0, sizeof(eccno));
    memset(pre, 0, sizeof(pre));
    for (int i = 1; i <= n; i++)
        if (!pre[i]) dfs(i, -1);
    for (int i = 1; i <= n; i++) {
        for (int j = 0; j < G[i].size(); j++) {
            int v = G[i][j].v;
            if (eccno[i] != eccno[v]) an[G[i][j].id] = 2;
        }
    }
}

struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     for (int i = 0; i <= n; i++) G[i].clear();
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
        cout<<i<<" "<<j<<endl;
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
             //   cout<<Eg[k].id<<endl;
                G[u].push_back(node(v,Eg[k].id));
                G[v].push_back(node(u,Eg[k].id));
                an[Eg[k].id] = 1;
            }
        }
        find_ecc();
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> SK;
int an[N];
int num;
int vis[N];
void dfs(int u,int fa) {
    pre[u] = low[u] = ++dfs_clock;
    int sz = G[u].size();
    bool first = true;
    for (int i = 0 ;i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first)  {
                first = false;
            continue;
        }
        if (pre[v] == 0) {
            dfs(v,u);
            low[u] = min(low[u], low[v]);
            if (low[v] > pre[u]) an[G[u][i].id] = 2;
        }else {
            low[u] = min(low[u],pre[v]);
        }

    }

}

int n,m;
struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
int mark[N];
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     memset(mark,0,sizeof(mark));
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
          for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                G[x].push_back(node(y,Eg[k].id));
                G[y].push_back(node(x,Eg[k].id));
                an[Eg[k].id] = 1;
                pre[x] = pre[y] = 0;
                mark[k] = x;
            }
        }
        dfs_clock = 0;
        for (int k = i; k <= j; k++) {
            if (mark[k] && pre[mark[k]] == 0) dfs(mark[k],-1);
        }
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> SK;
int an[N];
void dfs(int u,int fa) {
    pre[u] = low[u] = ++dfs_clock;
    int sz = G[u].size();
    for (int i = 0 ;i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa)  {
            continue;
        }
        if (!pre[v]) {
            dfs(v,u);
            low[u] = min(low[u], low[v]);
            if (low[v] > low[u]) an[G[u][i].id] = 2;
        }else {
            low[u] = min(low[u],pre[v]);
        }

    }

}
void init() {
    dfs_clock = 0;
    memset(pre, 0, sizeof(pre));
}
int n,m;
struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     for (int i = 0; i <= n; i++) G[i].clear();
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
       // cout<<i<<" "<<j<<endl;
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                G[u].push_back(node(v,Eg[k].id));
                G[v].push_back(node(u,Eg[k].id));
                an[Eg[k].id] = 1;
            }
        }
        init();
        for (int k = i; k <= j; k++) {
            if (!pre[Eg[i].u]) dfs(Eg[i].u,-1);
        }
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;
     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> SK;
int an[N];
int num;
int vis[N];
void dfs(int u,int fa) {
    pre[u] = low[u] = ++dfs_clock;
    int sz = G[u].size();
    bool first = true;
    for (int i = 0 ;i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first)  {
                first = false;
            continue;
        }
        if (pre[v] == 0) {
            dfs(v,u);
            low[u] = min(low[u], low[v]);
            if (low[v] > pre[u]) an[G[u][i].id] = 2;
        }else {
            low[u] = min(low[u],pre[v]);
        }

    }

}

int n,m;
struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
bool mark[N];
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
          for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                G[x].push_back(node(y,Eg[k].id));
                G[y].push_back(node(x,Eg[k].id));
                an[Eg[k].id] = 1;
                pre[x] = pre[y] = 0;
                mark[k] = x;
            }
        }
        dfs_clock = 0;
        for (int k = i; k <= j; k++) {
            if (mark[k] && pre[mark[k]] == 0) dfs(mark[k],-1);
        }
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> SK;
int an[N];
int num;
int vis[N];
void dfs(int u,int fa) {
    pre[u] = low[u] = ++dfs_clock;
    int sz = G[u].size();
    bool first = true;
    for (int i = 0 ;i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first)  {
        		first = false;
            continue;
        }
        if (pre[v] == 0) {
            dfs(v,u);
            low[u] = min(low[u], low[v]);
            if (low[v] > pre[u]) an[G[u][i].id] = 2;
        }else {
            low[u] = min(low[u],pre[v]);
        }

    }

}

int n,m;
struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
int mark[N];
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     memset(mark,0,sizeof(mark));
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
    	  for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                G[x].push_back(node(y,Eg[k].id));
                G[y].push_back(node(x,Eg[k].id));
                an[Eg[k].id] = 1;
                pre[x] = pre[y] = 0;
                mark[k] = x;
            }
        }
        dfs_clock = 0;
        for (int k = i; k <= j; k++) {
            if (mark[k] && pre[mark[k]] == 0) dfs(mark[k],-1);
        }
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
                G[x].clear(); G[y].clear();
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<stack>
using namespace std;
const int N = 100000+10;
struct node{
    int v,id;
    node(){}
    node(int v,int id):v(v),id(id){}
};
vector<node> G[N];
int pre[N], low[N], eccno[N], dfs_clock, ecc_cnt;
stack<int> S;
int an[N];

void dfs(int u, int fa) {
    pre[u] = low[u] = ++dfs_clock;
    S.push(u);
    bool first = true;
    int sz = G[u].size();
    for (int i = 0; i < sz; i++) {
        int v = G[u][i].v;
        if (v == fa && first) {
            first = false;
            continue;
        }
        if (!pre[v]) {
            dfs(v, u);
            low[u] = min(low[u], low[v]);
        } else  {
            low[u] = min(low[u], pre[v]);
        }
    }
    if (low[u] == pre[u]) {
        ecc_cnt++;
        while (true) {
            int v = S.top(); S.pop();
            eccno[v] = ecc_cnt;
        //    cout<<v<<" ";
            if (v == u) break;
        }
       // cout<<endl;
    }
}
int n,m;
struct edge{
    int u,v,w,id;
    edge(){}
    edge(int u,int v,int w, int id):u(u),v(v),w(w),id(id){}
    bool operator < (const edge &p) const{
        return w < p.w;
    }
};
vector<edge> Eg;
int p[N];
int find(int x) {
    return p[x] == x ? x : p[x] = find(p[x]);
}
bool mark[N*10];
void build_graph(){
     sort(Eg.begin(),Eg.end());
     for (int i = 0; i <= n; i++) p[i] = i;
     for (int i = 0; i <= n; i++) G[i].clear();
     for (int i = 0; i < Eg.size(); i++) {
        int j = i;
        for (; j < Eg.size() && Eg[j].w == Eg[j+1].w; j++);
       // cout<<i<<" "<<j<<endl;
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
             //   cout<<Eg[k].id<<endl;
                mark[k] = 1;
                G[u].push_back(node(v,Eg[k].id));
                G[v].push_back(node(u,Eg[k].id));
                an[Eg[k].id] = 1;
            }
        }
        dfs_clock = ecc_cnt = 0;
        memset(eccno, 0, sizeof(eccno));
        memset(pre, 0, sizeof(pre));
        for (int k = i; k <= j; k++)
            if (!pre[Eg[k].u]) dfs(Eg[k].u, -1);
        for (int k = i; k <= j; k++) {
            if (mark[k]) {
                if (eccno[u] != eccno[v]) an[Eg[k].id] = 2;
            }
        }
        for (int k = i; k <= j; k++) {
            int u = Eg[k].u, v = Eg[k].v, w = Eg[k].w;
            int x = find(u), y = find(v);
            if (x != y) {
                p[x] = y;
            }
        }
        i = j;

     }

}
void solve(){
    memset(an,0,sizeof(an));
    build_graph();
    for (int i = 0; i < m; i++) {
        if (an[i] == 0) printf("none\n");
        else if (an[i] == 1) printf("at least one\n");
        else if (an[i] == 2) printf("any\n");
    }
}
int main(){
    while (~scanf("%d%d",&n,&m)) {
        Eg.clear();
        for (int i = 0; i < m; i++) {
            int u,v,w;
            scanf("%d%d%d",&u,&v,&w);
            Eg.push_back(edge(u,v,w,i));
        }
        solve();
    }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_V + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (id != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, id));
        }
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, -1);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
            depth[v] = depth[to];
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
            if (depth[v] >= depth[to])
                ans[id] = 2;
        }
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_V + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
        }
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_V + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
            prev = to;
            previd = id;
        }
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MAXN 100005

#define MP make_pair
#define PB push_back
#define F first
#define S second
#define COST   F.F
#define ID     F.S
#define SOURCE S.F
#define DEST   S.S

typedef pair<int, int> ii;
typedef pair<ii, ii> iiii;
vector<iiii> E;

vector<vector<ii> > G(MAXN);
vector<bool> vis(MAXN), used(MAXN);
int low[MAXN], depth[MAXN];

typedef enum { NONE, SOME, ANY } quantifier;
char msg[][20] = { "none", "at least one", "any" };
quantifier cat[MAXN]; // Categorize edges

int N = 0;
map<int, int> names;

int n, m;

// ****** Union-Find *******
int rank[MAXN], parent[MAXN];

void init(int x) { rank[x] = 0; parent[x] = x; }
int find(int x) {
   if (x == parent[x]) return x;
   else return parent[x] = find(parent[x]);
}
void unite(int x, int y) {
   int a = find(x), b = find(y);
   if (rank[a] > rank[b]) parent[b] = a;
   else {
      parent[a] = b;
      if (rank[a] == rank[b]) rank[b]++;
   }
}
// *************************

int rename(int x) {
   if (names.find(x) != names.end()) return names[x];
   else return vis[N] = false, names[x] = N++;
}

int add(int x, int y, int id) {
   int a = rename(x), b = rename(y);

   if (a == b) return false;

   G[a].PB(MP(b, id));
   G[b].PB(MP(a, id));

   return true;
}

void clear_graph(int k, int l) {
   for (int i = 0; i < N; i++) {
      G[i].clear();
      vis[i] = false;
   }
   for (int i = k; i < l; i++)
      used[ E[i].ID ] = false;
   names.clear();
   N = 0;
}

// Find the bridges
int dfs(int x, int id, int d) {
   int mlow;

   vis[x] = true;
   mlow = depth[x] = d;

   #define y (G[x][i].F)
   #define yid (G[x][i].S)
   for (unsigned i = 0; i < G[x].size(); i++)
      if (!vis[y]) { // Tree edge
         used[yid] = true;
         mlow = min( mlow, dfs(y, yid, d+1) );
         if (low[y] > depth[x])
            cat[yid] = ANY; // Bridge!
      } else if (!used[yid]) { // Back edge
         mlow = min( mlow, depth[y] );
         used[yid] = true;
      }
   #undef y
   #undef yid

   return low[x] = mlow;
}

int main() {
   int a, b, c;

   scanf("%d%d", &n, &m);
   for (int i = 0; i < m; i++) {
      cat[i] = SOME;
      scanf("%d%d%d", &a, &b, &c);
      E.PB(MP(MP(c, i), MP(a, b)));
   }
   for (int i = 0; i <= n; i++)
      init(i);

   sort(E.begin(), E.end());

   for (unsigned i = 0; i < E.size(); i++)
      used[i] = false;

   for (unsigned j = 0; j < E.size(); j++) {
      // Find interval i..(j-1) of edges with equal weights
      unsigned i = j;
      for (j++; j < E.size() && E[j].COST == E[i].COST; j++);

      // Create component graph
      for (unsigned k = i; k < j; k++)
         if ( !add( find(E[k].SOURCE), find(E[k].DEST), E[k].ID ) )
            cat[ E[k].ID ] = NONE;

      // Find Bridges
      for (int k = 0; k < N; k++)
         if (!vis[k])
            dfs(k, -1, 0);

      // Add edges i..(j-1) in Union-Find
      for (unsigned k = i; k < j; k++)
         unite( find(E[k].SOURCE), find(E[k].DEST) );

      clear_graph(i, j);

      j--;
   }

   for (int i = 0; i < m; i++)
      printf("%s\n", msg[cat[i]]);

   return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MAXN 1000005

#define MP make_pair
#define PB push_back
#define F first
#define S second
#define COST   F.F
#define ID     F.S
#define SOURCE S.F
#define DEST   S.S

typedef pair<int, int> ii;
typedef pair<ii, ii> iiii;
vector<iiii> E;

vector<vector<ii> > G(MAXN);
vector<bool> vis(MAXN), used(MAXN);
int low[MAXN], depth[MAXN];

typedef enum { NONE, SOME, ANY } quantifier;
char msg[][20] = { "none", "at least one", "any" };
quantifier cat[MAXN]; // Categorize edges

int N = 0;
map<int, int> names;

int n, m;

// ****** Union-Find *******
int rank[MAXN], parent[MAXN];

void init(int x) { rank[x] = 0; parent[x] = x; }
int find(int x) {
   if (x == parent[x]) return x;
   else return parent[x] = find(parent[x]);
}
void unite(int x, int y) {
   int a = find(x), b = find(y);
   if (rank[a] > rank[b]) parent[b] = a;
   else {
      parent[a] = b;
      if (rank[a] == rank[b]) rank[b]++;
   }
}
// *************************

int rename(int x) {
   if (names.find(x) != names.end()) return names[x];
   else return vis[N] = false, names[x] = N++;
}

int add(int x, int y, int id) {
   int a = rename(x), b = rename(y);

   if (a == b) return false;

   G[a].PB(MP(b, id));
   G[b].PB(MP(a, id));

   return true;
}

void clear_graph(int k, int l) {
   for (int i = 0; i < N; i++) {
      G[i].clear();
      vis[i] = false;
   }
   for (int i = k; i < l; i++)
      used[ E[i].ID ] = false;
   names.clear();
   N = 0;
}

// Find the bridges
int dfs(int x, int id, int d) {
   int mlow;

   vis[x] = true;
   mlow = depth[x] = d;

   #define y (G[x][i].F)
   #define yid (G[x][i].S)
   for (unsigned i = 0; i < G[x].size(); i++)
      if (!vis[y]) { // Tree edge
         used[yid] = true;
         mlow = min( mlow, dfs(y, yid, d+1) );
         if (low[y] > depth[x])
            cat[yid] = ANY; // Bridge!
      } else if (!used[yid]) { // Back edge
         mlow = min( mlow, depth[y] );
         used[yid] = true;
      }
   #undef y
   #undef yid

   return low[x] = mlow;
}

int main() {
   int a, b, c;

   scanf("%d%d", &n, &m);
   for (int i = 0; i < m; i++) {
      cat[i] = SOME;
      scanf("%d%d%d", &a, &b, &c);
      E.PB(MP(MP(c, i), MP(a, b)));
   }
   for (int i = 0; i <= n; i++)
      init(i);

   sort(E.begin(), E.end());

   for (unsigned i = 0; i < E.size(); i++)
      used[i] = false;

   for (unsigned j = 0; j < E.size(); j++) {
      // Find interval i..(j-1) of edges with equal weights
      unsigned i = j;
      for (j++; j < E.size() && E[j].COST == E[i].COST; j++);

      // Create component graph
      for (unsigned k = i; k < j; k++)
         if ( !add( find(E[k].SOURCE), find(E[k].DEST), E[k].ID ) )
            cat[ E[k].ID ] = NONE;

      // Find Bridges
      for (int k = 0; k < N; k++)
         if (!vis[k])
            dfs(k, -1, 0);

      // Add edges i..(j-1) in Union-Find
      for (unsigned k = i; k < j; k++)
         unite( find(E[k].SOURCE), find(E[k].DEST) );

      clear_graph(i, j);

      j--;
   }

   for (int i = 0; i < m; i++)
      printf("%s\n", msg[cat[i]]);

   return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
            depth[v] = depth[to];
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
        }
        if (depth[v] >= depth[to])
            ans[id] = 2;
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (id != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, id));
        }
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector<int> ans(m);
    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, -1);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
            depth[v] = depth[to];
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
        }
        if (depth[v] == depth[to])
            ans[id] = 2;
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
            if (depth[v] == depth[to])
                ans[id] = 2;
        }
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
            if (depth[v] >= depth[to])
                ans[id] = 2;
        }
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#define MAX_V 100000
#define MAX_W 1000000

using namespace std;

struct edge {
    int a;
    int b;
    int i;
};

int comp[MAX_V + 1];
int rank[MAX_V + 1];
int ans[MAX_W + 1];
vector<pair<int, int> > adj[MAX_V + 1];
int depth[MAX_V + 1];

void init_comp () {
    for (int i = 1; i <= MAX_V; i++) {
        comp[i] = i;
        rank[i] = 0;
    }
}

int find (int v) {
    if (comp[v] == v)
        return v;
    else
        return (comp[v] = find(comp[v]));
}

void join (int u, int v) {
    u = find(u);
    v = find(v);

    if (rank[u] < rank[v])
        comp[u] = v;
    else
        comp[v] = u;

    if (rank[u] == rank[v]) rank[u]++;
}

int dfs (int v, int level, int parent) {
    if (depth[v] != 0) return depth[v];

    depth[v] = level;
    sort(adj[v].begin(), adj[v].end());
    int prev = 0;
    int previd = 0;
    for (unsigned int i = 0; i < adj[v].size(); i++) {
        int to = adj[v][i].first, id = adj[v][i].second;
        if (to == prev) {
            ans[id] = 2;
            ans[previd] = 2;
        } else if (to != parent) {
            depth[v] = min(depth[v], dfs(to, depth[v] + 1, v));
        }
        prev = to;
        previd = id;
    }
    return depth[v];
}

int main() {

    int n, m;
    scanf("%d %d", &n, &m);

    vector< vector<edge> > buckets(MAX_W + 1, vector<edge>());

    int w;
    edge e;
    for (int i = 0; i < m; i++) {
        scanf("%d %d %d", &e.a, &e.b, &w);
        e.i = i;
        buckets[w].push_back(e);
    }

    init_comp();
    for (int i = 1; i <= MAX_W; i++) {
        if (buckets[i].size() == 0) continue;
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            e.a = find(e.a);
            e.b = find(e.b);
            buckets[i][j] = e;
            if (e.a == e.b) {
                ans[e.i] = 0;
            } else {
                adj[e.a].push_back(make_pair(e.b, e.i));
                adj[e.b].push_back(make_pair(e.a, e.i));
                depth[e.a] = depth[e.b] = 0;
                ans[e.i] = 1;
            }
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (ans[e.i] != 0 && depth[e.a] == 0)
                dfs(e.a, 1, 0);
        }
        for (unsigned int j = 0; j < buckets[i].size(); j++) {
            e = buckets[i][j];
            if (e.a != e.b) {
                adj[e.a].clear();
                adj[e.b].clear();
                //printf("depths %d %d\n", depth[e.a], depth[e.b]);
                if (depth[e.a] == depth[e.b]) ans[e.i] = 2;
            }
            if (find(e.a) != find(e.b)) {
                join(e.a, e.b);
            }
        }
    }

    for (int i = 0; i < m; i++)
        switch (ans[i]) {
            case 0: printf("none\n"); break;
            case 1: printf("any\n"); break;
            default: printf("at least one\n");
        }

    return 0;
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>t[rs].mx||(t[ls].mx==t[rs].mx&&t[ls].id>t[rs].id))
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        w[v]=edg[tmp].w;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	int ttt=0;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
    ++cnt;
    cnt--;
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>t[rs].mx||(t[ls].mx==t[rs].mx&&t[ls].id>t[rs].id))
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        w[v]=edg[tmp].w;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>t[rs].mx||(t[ls].mx==t[rs].mx&&t[ls].id>t[rs].id))
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        w[v]=edg[tmp].w;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>t[rs].mx||(t[ls].mx==t[rs].mx&&t[ls].id>t[rs].id))
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        w[v]=edg[tmp].w;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	int try=0;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>=t[rs].mx)
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        w[v]=edg[tmp].w;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


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

const int N=2e5+1e3+7;

int cnt,totw,cnte,cntt,size[N],st[N],ed[N],top[N],fa[N],Fa[N],fae[N],son[N],ans[N],w[N],rev[N],head[N],dep[N];

struct Edge{
	int fr,to,w,id;
}e[N*2+1];

struct node{
	int ne,to,w,id;
}edg[N*2+1];

void build(int u,int v,int w,int x)
{
	++cnt;
	e[cnt].fr=u;
	e[cnt].to=v;
	e[cnt].w=w;
	e[cnt].id=x;
}

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

void adde(int u,int v,int w,int x)
{
	++cnte;
	edg[cnte].to=v;
	edg[cnte].w=w;
	edg[cnte].id=x;
	edg[cnte].ne=head[u];
	head[u]=cnte;
}

struct T{
	int l,r,ls,rs;
	int mx,id;
}t[N*2+1];

struct qans{
	int mx,id;
	void init()
	{
		mx=0;id=0;
	}
};

bool operator <(qans a,qans b)
{
	return a.mx<b.mx||(a.mx==b.mx&&a.id<b.id);
}

void update(int now)
{
	int ls=t[now].ls,rs=t[now].rs;
	if(t[ls].mx>=t[rs].mx)
		t[now].mx=t[ls].mx,t[now].id=t[ls].id;
	else
		t[now].mx=t[rs].mx,t[now].id=t[rs].id;
}

int segbuild(int l,int r)
{
	int now=++cntt;
	int mid=(l+r)>>1;
	t[now].l=l,t[now].r=r;
	if(l==r)
	{
		t[now].mx=w[rev[l]];
		t[now].id=rev[l];
		return now;
	}
	t[now].ls=segbuild(l,mid);
	t[now].rs=segbuild(mid+1,r);
	update(now);
	return now;
}

void mdf(int now,int p)
{
	int mid=(t[now].l+t[now].r)>>1;
	if(t[now].l==t[now].r)
	{
		t[now].id=0;
		return;
	}
	if(p<=mid)
		mdf(t[now].ls,p);
	else
		mdf(t[now].rs,p);
	update(now);
	return;
}

qans query(int now,int l,int r)
{
	int mid=(t[now].l+t[now].r)>>1;
	qans ret;
	ret.init();
	if(t[now].l>=l&&t[now].r<=r)
	{
		ret.mx=t[now].mx;
		ret.id=t[now].id;
		return ret;
	}
	if(l<=mid)
		ret=max(ret,query(t[now].ls,l,r));
	if(r>mid)
		ret=max(ret,query(t[now].rs,l,r));
	return ret;
}

void dfs1(int i)
{
    size[i]=1;
    for(int tmp=head[i];tmp;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i])
            continue;
        dep[v]=dep[i]+1;
        fa[v]=i;
        fae[v]=edg[tmp].id;
        dfs1(v);
        size[i]+=size[v];
        if(size[son[i]]<size[v])
            son[i]=v;
    }
}

void dfs2(int i)
{
    st[i]=ed[i]=++totw;
    rev[st[i]]=i;
    if(son[i]==0)
        return;
    int v=son[i];
    top[v]=top[i];
    dfs2(v);
    for(int tmp=head[i];tmp!=0;tmp=edg[tmp].ne)
    {
        int v=edg[tmp].to;
        if(v==fa[i]||v==son[i])
            continue;
        top[v]=v;
        dfs2(v);
    }
    ed[i]=totw;
}

int n,m;

int find(int x)
{
	return x==Fa[x]?x:Fa[x]=find(Fa[x]);
}

void kruskal()
{
	sort(e+1,e+m+1,cmp);
	for(int i=1;i<=n;i++)
		Fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		int u=e[i].fr,v=e[i].to;
		int fu=find(u),fv=find(v);
		if(fu!=fv)
		{
			Fa[fu]=fv;
			ans[e[i].id]=2;
			adde(e[i].fr,e[i].to,e[i].w,e[i].id);
			adde(e[i].to,e[i].fr,e[i].w,e[i].id);
		}
	}
}

bool solve(int u,int v,int w)
{
	bool ret=false;
	while(top[u]!=top[v])
	{
		if(dep[top[u]]<dep[top[v]])
			swap(u,v);
		qans now;
		now=query(1,st[top[u]],st[u]);
		if(now.mx==w)
		{
			ret=true;
			while(now.id)
			{
				ans[fae[now.id]]=1;
				mdf(1,st[now.id]);
				now=query(1,st[top[u]],st[u]);
			}
		}
		u=fa[top[u]];
	}
	if(u==v)
		return ret;
	if(dep[u]<dep[v])
		swap(u,v);
	qans now;
	now=query(1,st[v]+1,st[u]);
	if(now.mx==w)
	{
		ret=true;
		while(now.id)
		{
			ans[fae[now.id]]=1;
			mdf(1,st[now.id]);
			now=query(1,st[v]+1,st[u]);
		}
	}
	return ret;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int u,v,w;
		scanf("%d%d%d",&u,&v,&w);
		build(u,v,w,i);
	}
	kruskal();
	top[1]=1;
	dfs1(1);
	dfs2(1);
	for(int i=1;i<=n;i++)
		w[i]=edg[fae[i]].w;
	segbuild(1,n);
	for(int i=1;i<=m;i++)
		if(!ans[e[i].id])
			if(solve(e[i].fr,e[i].to,e[i].w))
				ans[e[i].id]=1;
	for(int i=1;i<=m;i++)
	{
		if(ans[i]==0)
			puts("none");
		if(ans[i]==1)
			puts("at least one");
		if(ans[i]==2)
			puts("any");
	}
}


#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#include<map>
#include<utility>
#include<assert.h>
using namespace std;
const int NV=300005;
const int LNV=11;//log2 of NV
const int NE=300005;
const int NQ=1000005;
const int intmax=0x7fffffff;
int ty[NE],go[NE];
struct Edge
{
    int ne,y,v;
};
struct Edge2
{
    int x,y,v,i;
    bool operator <(const Edge2 &a) const
    {
        return v<a.v;
    }
}e[NE];
bool cmp(Edge2 a,Edge2 b)
{
    return a.v<b.v;
}
struct DisSet
{
    int fa[NV],nv;
    void init(int n)
    {
        nv=n;
        for(int i=0;i<n;i++) fa[i]=i;
    }
    int find(int x)
    {
        if (fa[x]==x) return x;
        return fa[x]=find(fa[x]);
    }
    void uni(int x,int y)
    {
        fa[find(x)]=find(y);
    }
}dset;
struct Graph
{
    Edge e[NE];
    int ep,h[NV],nv,ne;
    void init(int n,int m=NE)
    {
        ne=m;
        nv=n;
        ep=2;
        memset(h,0,4*nv);
    }
    void add(int a,int b,int v=1)
    {
        e[ep].ne=h[a];
        e[ep].y=b;
        e[ep].v=v;
        h[a]=ep;
        ep++;
    }
    int low[NV],dfn[NV],ti;
    void barjan_dfs(int now,int from)
    {
        low[now]=dfn[now]=++ti;
        for(int i=h[now];i;i=e[i].ne)
        {
            if (!dfn[e[i].y])
            {
                barjan_dfs(e[i].y,i);
                low[now]=min(low[now],low[e[i].y]);
                if (low[e[i].y]==dfn[e[i].y]) ty[e[i].v]=1;
            }
            else if (i!=(from^1)) low[now]=min(low[now],dfn[e[i].y]);
        }
    }
}g;
int n,m,ep;
int main()
{
    scanf("%d%d",&n,&m);
    dset.init(n+1);
    g.init(n+1,m);
    for(int i=0;i<m;i++)
    {
        int a,b,c;
        scanf("%d%d%d",&a,&b,&c);
        e[i].x=a;
        e[i].y=b;
        e[i].v=c;
        e[i].i=i;
    }
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        ep=2;
        for(j=i;e[j].v==e[i].v;j++)
        {
            int x=dset.find(e[j].x);
            int y=dset.find(e[j].y);
            if (x!=y)
            {
                g.add(x,y,e[j].i);
                g.add(y,x,e[j].i);
                go[j]=x;
                ty[e[j].i]=2;
            }
        }
        for(int k=i;k<j;k++)
            if (go[k]&&!g.dfn[go[k]]) g.barjan_dfs(go[k],-1);
        for(int k=i;k<j;k++)
        {
            int x=dset.find(e[k].x);
            int y=dset.find(e[k].y);
            g.dfn[x]=g.dfn[y]=g.low[x]=g.low[y]=g.h[x]=g.h[y]=0;
            dset.uni(x,y);
        }
    }
    for(int i=0;i<m;i++)
    {
        if (ty[i]==0) puts("none");
        if (ty[i]==1) puts("any");
        if (ty[i]==2) puts("at least one");
    }
}


#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#include<map>
#include<utility>
#include<assert.h>
using namespace std;
const int NV=300005;
const int LNV=11;//log2 of NV
const int NE=300005;
const int NQ=1000005;
const int intmax=0x7fffffff;
int ty[NE],go[NE];
struct Edge
{
    int ne,y,v;
};
struct Edge2
{
    int x,y,v,i;
    bool operator <(const Edge2 &a) const
    {
        return v<a.v;
    }
}e[NE];
bool cmp(Edge2 a,Edge2 b)
{
    return a.v<b.v;
}
struct DisSet
{
    int fa[NV],nv;
    void init(int n)
    {
        nv=n;
        for(int i=0;i<n;i++) fa[i]=i;
    }
    int find(int x)
    {
        if (fa[x]==x) return x;
        return fa[x]=find(fa[x]);
    }
    void uni(int x,int y)
    {
        fa[find(x)]=find(y);
    }
}dset;
struct Graph
{
    Edge e[NE];
    int ep,h[NV],nv,ne;
    void init(int n,int m=NE)
    {
        ne=m;
        nv=n;
        ep=2;
        memset(h,0,4*nv);
    }
    void add(int a,int b,int v=1)
    {
        e[ep].ne=h[a];
        e[ep].y=b;
        e[ep].v=v;
        h[a]=ep;
        ep++;
    }
    int low[NV],dfn[NV],ti;
        //bcc is the number of bcc which egdes belong to
        //2-vertex connected component

    void barjan_dfs(int now,int from)
    {
        low[now]=dfn[now]=++ti;
        for(int i=h[now];i;i=e[i].ne)
        {
            if (!dfn[e[i].y])
            {
                barjan_dfs(e[i].y,i);
                low[now]=min(low[now],low[e[i].y]);
                if (low[e[i].y]==dfn[e[i].y])
                {
                    ty[e[i].v]=1;
                }
            }
            else if (i!=(from^1))
            {
                low[now]=min(low[now],dfn[e[i].y]);
            }
        }
    }
}g;
int n,m,ep;
int main()
{
    scanf("%d%d",&n,&m);
    dset.init(n+1);
    g.init(n+1,m);
    for(int i=0;i<m;i++)
    {
        int a,b,c;
        scanf("%d%d%d",&a,&b,&c);
        e[i].x=a;
        e[i].y=b;
        e[i].v=c;
        e[i].i=i;
    }
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        ep=2;
        for(j=i;e[j].v==e[i].v;j++)
        {
            int x=dset.find(e[j].x);
            int y=dset.find(e[j].y);
            if (x!=y)
            {
                g.add(x,y,e[j].i);
                g.add(y,x,e[j].i);
                go[j]=x;
                ty[e[j].i]=2;
            }
        }
        for(int k=i;k<j;k++)
            if (go[k]&&!g.dfn[go[k]]) g.barjan_dfs(go[k],-1);
        for(int k=i;k<j;k++)
        {
            int x=dset.find(e[k].x);
            int y=dset.find(e[k].y);
            g.dfn[x]=g.dfn[y]=g.low[x]=g.low[y]=g.h[x]=g.h[y]=0;
            dset.uni(x,y);
        }
    }
    for(int i=0;i<m;i++)
    {
        if (ty[i]==0) puts("none");
        if (ty[i]==1) puts("any");
        if (ty[i]==2) puts("at least one");
    }
}


#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#include<map>
#include<utility>
#include<assert.h>
using namespace std;
const int NV=300005;
const int LNV=11;//log2 of NV
const int NE=300005;
const int NQ=1000005;
const int intmax=0x7fffffff;
int ty[NE],go[NE];
struct Edge
{
    int ne,y,v;
};
struct Edge2
{
    int x,y,v,i;
    bool operator <(const Edge2 &a) const
    {
        return v<a.v;
    }
}e[NE];
bool cmp(Edge2 a,Edge2 b)
{
    return a.v<b.v;
}
struct DisSet
{
    int fa[NV],nv;
    void init(int n)
    {
        nv=n;
        for(int i=0;i<n;i++) fa[i]=i;
    }
    int find(int x)
    {
        if (fa[x]==x) return x;
        return fa[x]=find(fa[x]);
    }
    void uni(int x,int y)
    {
        fa[find(x)]=find(y);
    }
}dset;
struct Graph
{
    Edge e[NE];
    int ep,h[NV],nv,ne;
    void init(int n,int m=NE)
    {
        ne=m;
        nv=n;
        ep=2;
        memset(h,0,4*nv);
    }
    void add(int a,int b,int v=1)
    {
        e[ep].ne=h[a];
        e[ep].y=b;
        e[ep].v=v;
        h[a]=ep;
        ep++;
    }
    int low[NV],dfn[NV],ti;
        //bcc is the number of bcc which egdes belong to
        //2-vertex connected component

    void barjan_dfs(int now,int from)
    {
        low[now]=dfn[now]=++ti;
        for(int i=h[now];i;i=e[i].ne)
        {
            if (!dfn[e[i].y])
            {
                barjan_dfs(e[i].y,i);
                low[now]=min(low[now],low[e[i].y]);
                if (low[e[i].y]==dfn[e[i].y])
                {
                    ty[e[i].v]=1;
                }
            }
            else if (i!=(from^1))
            {
                low[now]=min(low[now],dfn[e[i].y]);
            }
        }
    }
}g;
int n,m,ep;
int main()
{
    scanf("%d%d",&n,&m);
    dset.init(n+1);
    g.init(n+1,m);
    for(int i=0;i<m;i++)
    {
        int a,b,c;
        scanf("%d%d%d",&a,&b,&c);
        e[i].x=a;
        e[i].y=b;
        e[i].v=c;
        e[i].i=i;
    }
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        ep=2;
        for(j=i;e[j].v==e[i].v;j++)
        {
            int x=dset.find(e[j].x);
            int y=dset.find(e[j].y);
            if (x!=y)
            {
                g.add(x,y,e[j].i);
                g.add(y,x,e[j].i);
                go[j]=x;
                ty[e[j].i]=2;
            }
        }
        for(int k=i;k<j;k++)
            if (go[k]) g.barjan_dfs(go[k],-1);
        for(int k=i;k<j;k++)
        {
            int x=dset.find(e[k].x);
            int y=dset.find(e[k].y);
            g.dfn[x]=g.dfn[y]=g.low[x]=g.low[y]=g.h[x]=g.h[y]=0;
            dset.uni(x,y);
        }
    }
    for(int i=0;i<m;i++)
    {
        if (ty[i]==0) puts("none");
        if (ty[i]==1) puts("any");
        if (ty[i]==2) puts("at least one");
    }
}


#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#include<map>
#include<utility>
#include<assert.h>
using namespace std;
const int NV=200000;
const int LNV=11;//log2 of NV
const int NE=200005;
const int NQ=1000005;
const int intmax=0x7fffffff;
int ty[NE],go[NE];
struct Edge
{
    int ne,y,v;
};
struct Edge2
{
    int x,y,v,i;
    bool operator <(const Edge2 &a) const
    {
        return v<a.v;
    }
}e[NE];
bool cmp(Edge2 a,Edge2 b)
{
    return a.v<b.v;
}
struct DisSet
{
    int fa[NV],nv;
    void init(int n)
    {
        nv=n;
        for(int i=0;i<n;i++) fa[i]=i;
    }
    int find(int x)
    {
        if (fa[x]==x) return x;
        return fa[x]=find(fa[x]);
    }
    void uni(int x,int y)
    {
        fa[find(x)]=find(y);
    }
}dset;
struct Graph
{
    Edge e[NE];
    int ep,h[NV],nv,ne;
    void init(int n,int m=NE)
    {
        ne=m;
        nv=n;
        ep=2;
        memset(h,0,4*nv);
    }
    void add(int a,int b,int v=1)
    {
        e[ep].ne=h[a];
        e[ep].y=b;
        e[ep].v=v;
        h[a]=ep;
        ep++;
    }
    int low[NV],dfn[NV],ti;
        //bcc is the number of bcc which egdes belong to
        //2-vertex connected component

    void barjan_dfs(int now,int from)
    {
        low[now]=dfn[now]=++ti;
        for(int i=h[now];i;i=e[i].ne)
        {
            if (!dfn[e[i].y])
            {
                barjan_dfs(e[i].y,i);
                low[now]=min(low[now],low[e[i].y]);
                if (low[e[i].y]==dfn[e[i].y])
                {
                    ty[e[i].v]=1;
                }
            }
            else if (i!=(from^1))
            {
                low[now]=min(low[now],dfn[e[i].y]);
            }
        }
    }
}g;
int n,m,ep;
int main()
{
    scanf("%d%d",&n,&m);
    dset.init(n+1);
    g.init(n+1,m);
    for(int i=0;i<m;i++)
    {
        int a,b,c;
        scanf("%d%d%d",&a,&b,&c);
        e[i].x=a;
        e[i].y=b;
        e[i].v=c;
        e[i].i=i;
    }
    sort(e,e+m);
    for(int i=0,j;i<m;i=j)
    {
        for(j=i;e[j].v==e[i].v;j++)
        {
            int x=dset.find(e[j].x);
            int y=dset.find(e[j].y);
            if (x!=y)
            {
                g.add(x,y,e[j].i);
                g.add(y,x,e[j].i);
                go[j]=x;
                ty[e[j].i]=2;
            }
        }
        for(int k=i;k<j;k++)
            if (go[k]) g.barjan_dfs(go[k],-1);
        for(int k=i;k<j;k++)
        {
            int x=dset.find(e[k].x);
            int y=dset.find(e[k].y);
            g.dfn[x]=g.dfn[y]=g.low[x]=g.low[y]=g.h[x]=g.h[y]=0;
            dset.uni(x,y);
        }
    }
    for(int i=0;i<m;i++)
    {
        if (ty[i]==0) puts("none");
        if (ty[i]==1) puts("any");
        if (ty[i]==2) puts("at least one");
    }
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#define FOR(i,s,e) for (int i=(s); i<(e); i++)
#define FOE(i,s,e) for (int i=(s); i<=(e); i++)
#define CLR(a, x) memset(a, x, sizeof(a))
#define N 100005
#define M 200005
using namespace std;

struct edge{
    int x, y, w, r;
    bool operator < (edge const &T) const{return w < T.w;}
};

edge a[M];
int n, m, x, y, t, lbl, ed;
int l[N], p[N], pr[N], fr[N], v[N], w[N];
int com[M], type[M], qd[M], qn[M], ql[M];

int find(int x){
    if (p[x] == x) return x;
    return p[x] = find(p[x]);
}

void bd(int x, int y, int lbl){
    qd[++ed] = y, qn[ed] = l[x], ql[ed] = lbl, l[x] = ed;
}

void dfs(int x, int y){
    v[x] = w[x] = ++t;
    for (int i=l[x]; i; i=qn[i]){
        if (!v[qd[i]]){
            dfs(qd[i], x);
            w[x] = min(w[x], w[qd[i]]);
            pr[qd[i]] = x;
            fr[qd[i]] = 1;
        }
        else if  (1) fr[qd[i]]++;
        else if (qd[i] != y) w[x] = min(w[x], v[qd[i]]);
    }

    // classify
    for (int i=l[x]; i; i=qn[i]){
        if (pr[qd[i]] != x) continue;
        if (fr[qd[i]] == 1 && w[qd[i]] > v[x]) type[ql[i]] = 1;
    }
}

int main(){
    scanf("%d%d", &n, &m);
    FOR(i,0,m) scanf("%d%d%d", &a[i].x, &a[i].y, &a[i].w), a[i].r = i;
    FOE(i,1,n) p[i] = i;
    sort(a, a + m);

    for (int i=0, j; i<m; i=j){
        j = i;
        ed = 0;
        while (j < m && a[j].w == a[i].w){
            x = find(a[j].x);
            y = find(a[j].y);
            lbl = a[j].r;
            if (x == y){
                type[lbl] = 0;
                com[j] = -1;
            }
            else{
                bd(x, y, lbl);
                bd(y, x, lbl);
                type[lbl] = 2;
                com[j] = x;
            }
            j++;
        }

        for (int k=i; k<j; k++){
            if (com[k] != -1 && !v[com[k]]) t = 0, dfs(com[k], -1);
        }

        for (int k=i; k<j; k++){
            x = find(a[k].x);
            y = find(a[k].y);
            l[x] = l[y] = v[x] = v[y] = 0;
            p[x] = y;
        }
    }

    FOR(i,0,m){
        if (!type[i]) puts("none");
        else if (type[i] == 1) puts("any");
        else puts("at least one");
    }
    return 0;
}