You are given a connected weighted undirected graph without any loops and multiple edges. 

Let us remind you that a graph's spanning tree is defined as an acyclic connected subgraph of the given graph that includes all of the graph's vertexes. The weight of a tree is defined as the sum of weights of the edges that the given tree contains. The minimum spanning tree (MST) of a graph is defined as the graph's spanning tree having the minimum possible weight. For any connected graph obviously exists the minimum spanning tree, but in the general case, a graph's minimum spanning tree is not unique.

Your task is to determine the following for each edge of the given graph: whether it is either included in any MST, or included at least in one MST, or not included in any MST.

Input

The first line contains two integers n and m (2 ≤ n ≤ 105, <image>) — the number of the graph's vertexes and edges, correspondingly. Then follow m lines, each of them contains three integers — the description of the graph's edges as "ai bi wi" (1 ≤ ai, bi ≤ n, 1 ≤ wi ≤ 106, ai ≠ bi), where ai and bi are the numbers of vertexes connected by the i-th edge, wi is the edge's weight. It is guaranteed that the graph is connected and doesn't contain loops or multiple edges.

Output

Print m lines — the answers for all edges. If the i-th edge is included in any MST, print "any"; if the i-th edge is included at least in one MST, print "at least one"; if the i-th edge isn't included in any MST, print "none". Print the answers for the edges in the order in which the edges are specified in the input.

Examples

Input

4 5
1 2 101
1 3 100
2 3 2
2 4 2
3 4 1


Output

none
any
at least one
at least one
any


Input

3 3
1 2 1
2 3 1
1 3 2


Output

any
any
none


Input

3 3
1 2 1
2 3 1
1 3 1


Output

at least one
at least one
at least one

Note

In the second sample the MST is unique for the given graph: it contains two first edges.

In the third sample any two edges form the MST for the given graph. That means that each edge is included at least in one MST.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * Created by vaksenov on 22.06.2020.
 */
public class C {
    public static void main(String[] args) {
        new C().run();
    }

    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    class Edge {
        int u, v;
        int res;

        public Edge(int u, int v) {
            this.u = u;
            this.v = v;
        }
    }

    class Neighbour {
        int v;
        Edge e;

        public Neighbour(int v, Edge e) {
            this.v = v;
            this.e = e;
        }
    }

    int[] p, r;

    public int get(int a) {
        return p[a] = (a == p[a] ? a : get(p[a]));
    }

    public boolean union(int a, int b) {
        a = get(a);
        b = get(b);

        if (a == b) {
            return false;
        }

        if (r[a] == r[b]) {
            r[a]++;
        }
        if (r[a] > r[b]) {
            int q = a;
            a = b;
            b = q;
        }
        p[a] = b;
        return true;
    }

    int epoch = 0;
    ArrayList<Neighbour>[] actualG;
    int[] mark;
    int[] tin, fup;
    int time = 0;

    public void dfs(int v, Edge p) {
        mark[v] = epoch;
        tin[v] = time;
        fup[v] = time;
        time++;
        for (Neighbour u : actualG[v]) {
            int to = u.v;
            if (u.e == p) {
                continue;
            }
            if (mark[to] == epoch) {
                fup[v] = Math.min(fup[v], tin[to]);
            } else {
                dfs(to, u.e);
                fup[v] = Math.min(fup[v], fup[to]);
                if (fup[to] > tin[v]) {
                    u.e.res = 1;
                }
            }
        }
    }


    public void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();

        Edge[] all = new Edge[m];
        ArrayList<Edge>[] layers = new ArrayList[1_000_001];
        for (int i = 0; i < layers.length; i++) {
            layers[i] = new ArrayList<>();
        }
        for (int i = 0; i < m; i++) {
            int a = nextInt() - 1;
            int b = nextInt() - 1;
            Edge e = new Edge(a, b);
            layers[nextInt() - 1].add(e);
            all[i] = e;
        }

        p = new int[n];
        r = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = i;
        }

        actualG = new ArrayList[n];
        for (int i = 0; i < actualG.length; i++) {
            actualG[i] = new ArrayList<>();
        }

        epoch = 0;
        mark = new int[n];
        fup = new int[n];
        tin = new int[n];

        for (ArrayList<Edge> edges : layers) {
            epoch++;
            if (edges.size() == 0) {
                continue;
            }
            ArrayDeque<Integer> actualV = new ArrayDeque<>();
            for (Edge edge : edges) {
                int u = get(edge.u);
                int v = get(edge.v);
                if (u == v) {
                    edge.res = -1;
                    continue;
                }
                edge.res = 0;
                actualV.add(u);
                actualV.add(v);
                actualG[u].add(new Neighbour(v, edge));
                actualG[v].add(new Neighbour(u, edge));
            }

            time = 0;
            for (int v : actualV) {
                if (mark[v] != epoch) {
                    dfs(v, null);
                }
            }

            for (int v : actualV) {
                for (Neighbour u : actualG[v]) {
                    union(v, u.v);
                }
                actualG[v].clear();
            }
        }

        for (Edge e : all) {
            if (e.res == -1) {
                out.println("none");
            } else if (e.res == 0) {
                out.println("at least one");
            } else {
                out.println("any");
            }
        }
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
