func_code_string: #include <bits/stdc++.h>   using namespace std;   struct node {     int to, u, w;   } edge[200000];   struct data {     int x, y, w, d;   } v[200010];   int k = 1, f[200000], low[200010], dfu[200010], n, m, ans[200010], head[200010],       cnt, l;   bool vis[200010];   void add(int x, int y, int z) {     edge[k].u = y;     edge[k].to = head[x];     edge[k].w = z;     head[x] = k++;   }   int getfather(int x) {     if (f[x] == x) return x;     f[x] = getfather(f[x]);     return f[x];   }   void dfs(int now, int from) {     low[now] = dfu[now] = cnt++;     vis[now] = 1;     for (int i = head[now]; i != -1; i = edge[i].to) {       int u = edge[i].u;       if (vis[u] == 1 && edge[i].w != from)         low[now] = min(low[now], dfu[u]);       else if (vis[u] != 1) {         dfs(u, edge[i].w);         low[now] = min(low[now], low[u]);         if (dfu[now] < low[u]) ans[edge[i].w] = 2;       }     }   }   void add(int x, int y) {     int xx = getfather(x);     int yy = getfather(y);     if (xx != yy) {       dfu[x] = dfu[y] = dfu[xx] = dfu[yy] = 0;       low[x] = low[y] = low[xx] = low[yy] = 0;       vis[x] = vis[y] = vis[xx] = vis[yy] = 0;       head[x] = head[y] = head[xx] = head[yy] = -1;       f[xx] = yy;     }   }   bool comp(data x, data y) { return x.w < y.w; }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= m; i++) {       scanf( %d%d%d , &v[i].x, &v[i].y, &v[i].w);       v[i].d = i;     }     sort(v + 1, v + m + 1, comp);     memset(head, -1, sizeof(head));     for (int i = 1; i <= n; i++) f[i] = i;     l = 1;     for (int i = 1; i <= m; i++)       if (v[i].w != v[i + 1].w) {         for (int j = l; j <= i; j++) {           int xx = getfather(v[j].x);           int yy = getfather(v[j].y);           if (xx == yy) {             ans[v[j].d] = 1;           } else {             add(xx, yy, v[j].d);             add(yy, xx, v[j].d);           }         }         for (int j = l; j <= i; j++) {           int xx = getfather(v[j].x);           int yy = getfather(v[j].y);           if (xx != yy && vis[xx] == 0) dfs(xx, -1);           if (xx != yy && vis[yy] == 0) dfs(yy, -1);         }         for (int j = l; j <= i; j++) {           add(v[j].x, v[j].y);         }         l = i + 1;       }     for (int i = 1; i <= m; i++)       if (ans[i] == 1)         printf( %s n ,  none );       else if (ans[i] == 0)         printf( %s n ,  at least one );       else         printf( %s n ,  any );   }   