// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	vector<int>tmp;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		tmp.clear();
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				if(!mk[u]) mk[u] = true , tmp.push_back(u);
				if(!mk[v]) mk[v] = true , tmp.push_back(v);
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		fill_n(mk , MN , false);
		for(int j=0;j<tmp.size();++j)
			if(!mk[tmp[j]])
				dfs(tmp[j] , -1);
		for(int j=0;j<tmp.size();++j)
			edges[tmp[i]].clear();
		for(int j=0;j<E[i].size();++j){
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
		}
		for(int j=0;j<E[i].size();++j){
			edges[es[E[i][j]]].clear();
			edges[ee[E[i][j]]].clear();
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 2e5 + 85;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
		//	h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	fill_n(par , MN , -1);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	vector<int>tmp;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		tmp.clear();
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				if(!mk[u]){ mk[u] = true , tmp.push_back(u);}
				if(!mk[v]){ mk[v] = true , tmp.push_back(v);}
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		fill_n(mk , MN , false);
		for(int j=0;j<tmp.size();++j)
			if(!mk[tmp[j]])
				dfs(tmp[j] , -1);
		for(int j=0;j<tmp.size();++j)
			edges[tmp[i]].clear();
		for(int j=0;j<E[i].size();++j){
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	vector<int>tmp;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				if(!mk[u]) mk[u] = true , tmp.push_back(u);
				if(!mk[v]) mk[v] = true , tmp.push_back(v);
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		fill_n(mk , MN , false);
		for(int j=0;j<tmp.size();++j)
			if(!mk[tmp[j]])
				dfs(tmp[j] , -1);
		for(int j=0;j<tmp.size();++j)
			edges[tmp[i]].clear();
		for(int j=0;j<E[i].size();++j){
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = true;
				mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			mh[tmp[i]] = h[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			Union(es[E[i].second] , ee[E[i].second]);
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	fill_n(mk , MN , false);
	fill_n(h , MN , 0);
	fill_n(mh , MN , 0);
	for(l=0;l<m;){
		vector<int>tmp;
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = true;
				mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			mh[tmp[i]] = h[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			Union(es[E[i].second] , ee[E[i].second]);
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 2e5 + 85;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 2e5 + 85;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			edges[tmp[i]].clear();
			mk[tmp[i]] = false;
			h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = root(edges[s][i].first);
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
		}
		for(int j=0;j<E[i].size();++j){
			edges[es[E[i][j]]].clear();
			edges[ee[E[i][j]]].clear();
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 2e5 + 85;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	fill_n(par , MN , -1);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	vector<int>tmp;
	for(int i=0;i<MN;++i){
		if(E[i].empty()) continue;
		tmp.clear();
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				if(!mk[u]){ mk[u] = true , tmp.push_back(u);}
				if(!mk[v]){ mk[v] = true , tmp.push_back(v);}
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		fill_n(mk , MN , false);
		for(int j=0;j<tmp.size();++j)
			if(!mk[tmp[j]])
				dfs(tmp[j] , -1);
		for(int j=0;j<tmp.size();++j)
			edges[tmp[i]].clear();
		for(int j=0;j<E[i].size();++j){
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = root(edges[s][i].first);
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
		}
		for(int j=0;j<E[i].size();++j){
			edges[es[E[i][j]]].clear();
			edges[ee[E[i][j]]].clear();
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MN;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	fill_n(mk , MN , false);
	fill_n(h , MN , 0);
	fill_n(mh , MN , 0);
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = true;
				mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			mh[tmp[i]] = h[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			Union(es[E[i].second] , ee[E[i].second]);
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			edges[tmp[i]].clear();
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


// In the name of God
// Code by: mrMaster

#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 1e5 + 85;
const int MC = 1e6 + 5;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
vector<int>E[MC];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[ew[i]].push_back(i);
	}
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v;
	for(int i=0;i<MC;++i){
		if(E[i].empty()) continue;
		fill_n(mk , MN, false);
		fill_n(h , MN , 0);
	 	fill_n(mh , MN , 0);
		for(int j=0;j<E[i].size();++j){
			u = root(es[E[i][j]]) , v = root(ee[E[i][j]]);
			if(u != v){
				edges[u].push_back(pii(v , E[i][j]));
				edges[v].push_back(pii(u , E[i][j]));
			}else
				res[E[i][j]] = 1;
		}
		for(int j=0;j<E[i].size();++j){
			if(!mk[root(es[E[i][j]])])
				dfs(root(es[E[i][j]]) , -1);
			if(res[E[i][j]] != 1){
				if(!bridge[E[i][j]])
					res[E[i][j]] = 2;
				else{
					res[E[i][j]] = 3;
				}
				Union(es[E[i][j]] , ee[E[i][j]]);
			}
		}
		for(int j=0;j<E[i].size();++j)
			edges[root(es[E[i][j]])].clear() , edges[root(ee[E[i][j]])].clear();
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int>pii;

const int MN = 2e5 + 85;

string ans[3] = {"none" , "at least one" , "any"};

int n,m;
int par[MN], sz[MN];

int es[MN], ee[MN] , ew[MN];
pii E[MN];
int res[MN];

bool mk[MN],bridge[MN];
int h[MN] , mh[MN];
vector<pii>edges[MN];

int root(int a)
{
	if(par[a] == a)
		return a;
	par[a] = root(par[a]);
	return par[a];
}

void Union(int a, int b)
{
	a = root(a);
	b = root(b);
	if(a == b)
		return;
	if(sz[a] < sz[b])
		swap(a,b);
	par[b] = a;
	sz[a] += sz[b];
}

void input()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	for(int i=0;i<MN;++i)
		par[i] = i , sz[i] = 1;
	cin >> n >> m;
	for(int i=0;i<m;++i){
		cin >> es[i] >> ee[i] >> ew[i];
		--es[i] , --ee[i];
		E[i] = pii(ew[i] , i);
	}
	sort(E , E + m);
}

void dfs(int s, int par)
{
	mk[s] = true;
	int v,e;
	for(int i=0;i<edges[s].size();++i){
		v = edges[s][i].first;
		e = edges[s][i].second;
		if(!mk[v]){
			h[v] = mh[v] = h[s]+1;
			dfs(v , e);
			mh[s] = min(mh[s] , mh[v]);
			if(h[s] < mh[v])
				bridge[e] = true;
		}else if(h[v] < mh[s] && par != e)
			mh[s] = h[v];
	}
}

void solve()
{
	int u,v,l,r;
	vector<int>tmp;
	for(l=0;l<m;){
		tmp.clear();
		for(r=l;E[r].first == E[r+1].first;++r);
		for(int i=l;i<=r;++i){
			u = root(es[E[i].second]) , v = root(ee[E[i].second]);
			if(u != v){
				if(!mk[u]) tmp.push_back(u);
				if(!mk[v]) tmp.push_back(v);
				mk[u] = mk[v] = true;
				edges[v].push_back(pii(u , E[i].second));
				edges[u].push_back(pii(v , E[i].second));
			}else
				res[E[i].second] = 1;
		}
		for(int i=0;i<tmp.size();++i)
			mk[tmp[i]] = false;
		for(int i=0;i<tmp.size();++i)
			if(!mk[tmp[i]])
				dfs(tmp[i] , -1);
		for(int i=0;i<tmp.size();++i){
			mk[tmp[i]] = false;
			h[tmp[i]] = mh[tmp[i]] = 0;
		}
		for(int i=l;i<=r;++i){
			if(res[E[i].second] != 1){
				if(!bridge[E[i].second])
					res[E[i].second] = 2;
				else
					res[E[i].second] = 3;
				Union(es[E[i].second] , ee[E[i].second]);
			}
		}
		l = r+1;
	}
}

int main()
{
	ios_base :: sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	input();
	solve();
	for(int i=0;i<m;++i)
		cout << ans[res[i]-1] << endl;
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[i] ^ Tarjan::NextVis) {
			Tarjan::find_cut(i, 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		if (all[i].len == all[i - 1].len) {
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(all[j].fr, all[j].to);
			}
			front = i;
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[find(i)] ^ Tarjan::NextVis) {
			Tarjan::find_cut(find(i), 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		if (all[i].len == all[i - 1].len) {
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(all[j].fr, all[j].to);
				iHead[find(all[j].fr)] = 0;
			}
			front = i;
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define READ_3(a, b, c) read(a);read(b);read(c)

//#define PAUSE while(1);

namespace set
{
	int belong[112345];

	int find(int n)
	{
		return belong[n] == n ? n : belong[n] = find(belong[n]);
	}

	inline void combine(int fth, int son)
	{
		int f(find(fth)), s(find(son));
		if (f ^ s) belong[s] = f;
	}
}

class edge
{
public:
	int fr, to, len, rank;

	bool operator<(const edge& ed) const
	{
		return len < ed.len;
	}
}all[112345];

class graph
{
public:
	graph() : iEnd(2) {}
	class edge
	{
	public:
		int to, len, next, rank;
	}all[212345];
	int iEnd;
	int iHead[112345];

	void add(int fr, int to, int len, int rank)
	{
		all[iEnd].to = to;
		all[iEnd].len = len;
		all[iEnd].rank = rank;
		all[iEnd].next = iHead[fr];
		iHead[fr] = iEnd++;
	}
}map;

void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9')
	{
		v = v * 10 + c - '0';
		c = getchar();
	}
}
int n, m;

int ans[112345];

int front;

inline void GetMin(int& a, int b) { if (b < a) a = b; }
namespace tar
{
	int low[112345], vistime[112345], nowtime(1);
	bool bIsCut[112345];
	void find_bridge(int now, int father, int edrk)
	{
		low[now] = vistime[now] = nowtime++;
		int tofth(0);
		for (int i(map.iHead[now]); i; i = map.all[i].next)
		{
			int to(map.all[i].to);
			if (!vistime[to])
			{
				find_bridge(to, now, i);
				GetMin(low[now], low[to]);
			}
			else
			{
				if (to != father) GetMin(low[now], vistime[to]);
				else ++tofth;
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] >= vistime[now]) bIsCut[map.all[edrk].rank] = true;
	}
}

void judge(int beg, int end)
{
	tar::nowtime = 1;
	for (int i(beg); i != end; ++i)
	{
		if (!tar::vistime[all[i].fr])
		{
			tar::find_bridge(all[i].fr, -1, -1);
		}
		if (tar::bIsCut[all[i].rank])
		{
			ans[all[i].rank] = 1;
		}
		set::combine(all[i].fr, all[i].to);
		map.iHead[all[i].fr] = 0;
	}
}

int main()
{
	read(n); read(m);
	for (int i(1); i <= n; ++i) set::belong[i] = i;
	for (int i(0); i != m; ++i)
	{
		READ_3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	map.add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	map.add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i)
	{
		all[i].fr = set::find(all[i].fr);
		all[i].to = set::find(all[i].to);
		if (all[i].len == all[i - 1].len)
		{
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
		else
		{
			judge(front, i);
			front = i;
			all[i].fr = set::find(all[i].fr);
			all[i].to = set::find(all[i].to);
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i)
	{
		if (ans[i] == -1) puts("none");
		else if (ans[i] == 0) puts("at least one");
		else puts("any");
	}
	//PAUSE
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	Tarjan::nowtime = 1;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[find(i)] ^ Tarjan::NextVis) {
			Tarjan::find_cut(find(i), 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		int f(find(all[i].fr)), t(find(all[i].to));
		if (all[i].len == all[i - 1].len) {
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(f, t);
				iHead[f] = 0;
			}
			front = i;
			f = find(f); t = find(t);
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345], cnt[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		if (cnt[f] < cnt[ff]) f ^= ff ^= f ^= ff;
		belong[ff] = f;
		cnt[f] += cnt[ff];
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[all[i].to] ^ NextVis) {
				find_cut(all[i].to, now, i);
				GetMin(low[now], low[all[i].to]);
			} else {
				if (all[i].to == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[all[i].to]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[i] ^ Tarjan::NextVis) {
			Tarjan::find_cut(i, 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i; cnt[i] = 1;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		if (all[i].len == all[i - 1].len) {
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				add(all[i].to, all[i].fr, all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(all[j].fr, all[j].to);
			}
			front = i;
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				add(all[i].to, all[i].fr, all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[i] ^ Tarjan::NextVis) {
			Tarjan::find_cut(i, 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		if (all[i].len == all[i - 1].len) {
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(all[j].fr, all[j].to);
				iHead[find(all[j].fr)] = 0;
			}
			front = i;
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>
#define READ_3(a, b, c) read(a);read(b);read(c)
namespace set
{
	int belong[112345];

	int find(int n)
	{
		return belong[n] == n ? n : belong[n] = find(belong[n]);
	}

	inline void combine(int fth, int son)
	{
		int f(find(fth)), s(find(son));
		if (f ^ s) belong[s] = f;
	}
}

class edge
{
public:
	int fr, to, len, rank;

	bool operator<(const edge& ed) const
	{
		return len < ed.len;
	}
}all[112345];

class graph
{
public:
	graph() : iEnd(2) {}
	class edge
	{
	public:
		int to, len, next, rank;
	}all[212345];
	int iEnd;
	int iHead[112345];

	void add(int fr, int to, int len, int rank)
	{
		all[iEnd].to = to;
		all[iEnd].len = len;
		all[iEnd].rank = rank;
		all[iEnd].next = iHead[fr];
		iHead[fr] = iEnd++;
	}
}map;

void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9')
	{
		v = v * 10 + c - '0';
		c = getchar();
	}
}
int n, m;
int ans[112345];
int front;
inline void GetMin(int& a, int b) { if (b < a) a = b; }
namespace tar
{
	int low[112345], vistime[112345], nowtime(1);
	bool bIsCut[112345];
	void find_bridge(int now, int father, int edrk)
	{
		low[now] = vistime[now] = nowtime++;
		int tofth(0);
		for (int i(map.iHead[now]); i; i = map.all[i].next)
		{
			int to(map.all[i].to);
			if (!vistime[to])
			{
				find_bridge(to, now, i);
				GetMin(low[now], low[to]);
			}
			else
			{
				if (to != father) GetMin(low[now], vistime[to]);
				else ++tofth;
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] >= vistime[now]) bIsCut[map.all[edrk].rank] = true;
	}
}

void judge(int beg, int end)
{
	tar::nowtime = 1;
	for (int i(beg); i != end; ++i)
	{
		if (!tar::vistime[all[i].fr])
		{
			tar::find_bridge(all[i].fr, -1, -1);
		}
		if (tar::bIsCut[all[i].rank])
		{
			ans[all[i].rank] = 1;
		}
		set::combine(all[i].fr, all[i].to);
		map.iHead[all[i].fr] = 0;
	}
}
int main()
{
	read(n); read(m);
	for (int i(1); i <= n; ++i) set::belong[i] = i;
	for (int i(0); i != m; ++i)
	{
		READ_3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	map.add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	map.add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i)
	{
		all[i].fr = set::find(all[i].fr);
		all[i].to = set::find(all[i].to);
		if (all[i].len == all[i - 1].len)
		{
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
		else
		{
			judge(front, i);
			front = i;
			all[i].fr = set::find(all[i].fr);
			all[i].to = set::find(all[i].to);
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i)
	{
		if (ans[i] == -1) puts("none");
		else if (ans[i] == 0) puts("at least one");
		else puts("any");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define READ_3(a, b, c) read(a);read(b);read(c)

namespace set
{
	int belong[112345];

	int find(int n)
	{
		return belong[n] == n ? n : belong[n] = find(belong[n]);
	}

	inline void combine(int fth, int son)
	{
		int f(find(fth)), s(find(son));
		if (f ^ s) belong[s] = f;
	}
}

class edge
{
public:
	int fr, to, len, rank;

	bool operator<(const edge& ed) const
	{
		return len < ed.len;
	}
}all[112345];

class graph
{
public:
	graph() : iEnd(2) {}
	class edge
	{
	public:
		int to, len, next, rank;
	}all[212345];
	int iEnd;
	int iHead[112345];

	void add(int fr, int to, int len, int rank)
	{
		all[iEnd].to = to;
		all[iEnd].len = len;
		all[iEnd].rank = rank;
		all[iEnd].next = iHead[fr];
		iHead[fr] = iEnd++;
	}
}map;

void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9')
	{
		v = v * 10 + c - '0';
		c = getchar();
	}
}
int n, m;

int ans[112345];

int front;

inline void GetMin(int& a, int b) { if (b < a) a = b; }
namespace tar
{
	int low[112345], vistime[112345], nowtime(1);
	bool bIsCut[112345];
	void find_bridge(int now, int father, int edrk)
	{
		low[now] = vistime[now] = nowtime++;
		int tofth(0);
		for (int i(map.iHead[now]); i; i = map.all[i].next)
		{
			int to(map.all[i].to);
			if (!vistime[to])
			{
				find_bridge(to, now, i);
				GetMin(low[now], low[to]);
			}
			else
			{
				if (to != father) GetMin(low[now], vistime[to]);
				else ++tofth;
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] >= vistime[now]) bIsCut[map.all[edrk].rank] = true;
	}
}

void judge(int beg, int end)
{
	tar::nowtime = 1;
	for (int i(beg); i != end; ++i)
	{
		if (!tar::vistime[all[i].fr])
		{
			tar::find_bridge(all[i].fr, -1, -1);
		}
		if (tar::bIsCut[all[i].rank])
		{
			ans[all[i].rank] = 1;
		}
		set::combine(all[i].fr, all[i].to);
		map.iHead[all[i].fr] = 0;
	}
}

int main()
{
	read(n); read(m);
	for (int i(1); i <= n; ++i) set::belong[i] = i;
	for (int i(0); i != m; ++i)
	{
		READ_3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	map.add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	map.add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i)
	{
		all[i].fr = set::find(all[i].fr);
		all[i].to = set::find(all[i].to);
		if (all[i].len == all[i - 1].len)
		{
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
		else
		{
			judge(front, i);
			front = i;
			all[i].fr = set::find(all[i].fr);
			all[i].to = set::find(all[i].to);
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i)
	{
		if (ans[i] == -1) puts("none");
		else if (ans[i] == 0) puts("at least one");
		else puts("any");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	nowtime = 1;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[find(i)] ^ Tarjan::NextVis) {
			Tarjan::find_cut(find(i), 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		int f(find(all[i].fr)), t(find(all[i].to));
		if (all[i].len == all[i - 1].len) {
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(f, t);
				iHead[f] = 0;
			}
			front = i;
			f = find(f); t = find(t);
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, find(now)) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[i] ^ Tarjan::NextVis) {
			Tarjan::find_cut(i, 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		if (all[i].len == all[i - 1].len) {
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(all[j].fr, all[j].to);
				iHead[find(all[j].fr)] = 0;
				iHead[find(all[j].to)] = 0;
			}
			front = i;
			if (find(all[i].fr) == find(all[i].to)) ans[all[i].rank] = -1;
			else {
				add(find(all[i].fr), find(all[i].to), all[i].len, all[i].rank);
				add(find(all[i].to), find(all[i].fr), all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define READ_3(a, b, c) read(a);read(b);read(c)

//#define PAUSE while(1);

namespace set
{
	int belong[112345];

	int find(int n)
	{
		return belong[n] == n ? n : belong[n] = find(belong[n]);
	}

	inline void combine(int fth, int son)
	{
		int f(find(fth)), s(find(son));
		if (f ^ s) belong[s] = f;
	}
}

class edge
{
public:
	int fr, to, len, rank;

	bool operator<(const edge& ed) const
	{
		return len < ed.len;
	}
}all[112345];

class graph
{
public:
	graph() : iEnd(2) {}
	class edge
	{
	public:
		int to, len, next, rank;
	}all[212345];
	int iEnd;
	int iHead[112345];

	void add(int fr, int to, int len, int rank)
	{
		all[iEnd].to = to;
		all[iEnd].len = len;
		all[iEnd].rank = rank;
		all[iEnd].next = iHead[fr];
		iHead[fr] = iEnd++;
	}
}map;

void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9')
	{
		v = v * 10 + c - '0';
		c = getchar();
	}
}
int n, m;

int ans[112345];

int front;

inline void GetMin(int& a, int b) { if (b < a) a = b; }
namespace tar
{
	int low[112345], vistime[112345], nowtime(1);
	bool bIsCut[112345];
	void find_bridge(int now, int father, int edrk)
	{
		low[now] = vistime[now] = nowtime++;
		int tofth(0);
		for (int i(map.iHead[now]); i; i = map.all[i].next)
		{
			int to(map.all[i].to);
			if (!vistime[to])
			{
				find_bridge(to, now, i);
				GetMin(low[now], low[to]);
			}
			else
			{
				if (to != father) GetMin(low[now], vistime[to]);
				else ++tofth;
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] >= vistime[now]) bIsCut[map.all[edrk].rank] = true;
	}
}

void judge(int beg, int end)
{
	for (int i(beg); i != end; ++i)
	{
		if (!tar::vistime[all[i].fr])
		{
			tar::find_bridge(all[i].fr, -1, -1);
		}
		if (tar::bIsCut[all[i].rank])
		{
			ans[all[i].rank] = 1;
		}
		set::combine(all[i].fr, all[i].to);
		map.iHead[all[i].fr] = 0;
	}
}

int main()
{
	read(n); read(m);
	for (int i(1); i <= n; ++i) set::belong[i] = i;
	for (int i(0); i != m; ++i)
	{
		READ_3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	map.add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	map.add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i)
	{
		all[i].fr = set::find(all[i].fr);
		all[i].to = set::find(all[i].to);
		if (all[i].len == all[i - 1].len)
		{
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
		else
		{
			judge(front, i);
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i)
	{
		if (ans[i] == -1) puts("none");
		else if (ans[i] == 0) puts("at least one");
		else puts("any");
	}
	//PAUSE
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define READ_3(a, b, c) read(a);read(b);read(c)

//#define PAUSE while(1);

namespace set
{
	int belong[112345];

	int find(int n)
	{
		return belong[n] == n ? n : belong[n] = find(belong[n]);
	}

	inline void combine(int fth, int son)
	{
		int f(find(fth)), s(find(son));
		if (f ^ s) belong[s] = f;
	}
}

class edge
{
public:
	int fr, to, len, rank;

	bool operator<(const edge& ed) const
	{
		return len < ed.len;
	}
}all[112345];

class graph
{
public:
	graph() : iEnd(2) {}
	class edge
	{
	public:
		int to, len, next, rank;
	}all[212345];
	int iEnd;
	int iHead[112345];

	void add(int fr, int to, int len, int rank)
	{
		all[iEnd].to = to;
		all[iEnd].len = len;
		all[iEnd].rank = rank;
		all[iEnd].next = iHead[fr];
		iHead[fr] = iEnd++;
	}
}map;

void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9')
	{
		v = v * 10 + c - '0';
		c = getchar();
	}
}
int n, m;

int ans[112345];

int front;

inline void GetMin(int& a, int b) { if (b < a) a = b; }
namespace tar
{
	int low[112345], vistime[112345], nowtime(1);
	bool bIsCut[112345];
	void find_bridge(int now, int father, int edrk)
	{
		low[now] = vistime[now] = nowtime++;
		int tofth(0);
		for (int i(map.iHead[now]); i; i = map.all[i].next)
		{
			int to(map.all[i].to);
			if (!vistime[to])
			{
				find_bridge(to, now, i);
				GetMin(low[now], low[to]);
			}
			else
			{
				if (to != father) GetMin(low[now], vistime[to]);
				else ++tofth;
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] >= vistime[now]) bIsCut[map.all[edrk].rank] = true;
	}
}

void judge(int beg, int end)
{
	for (int i(beg); i != end; ++i)
	{
		if (!tar::vistime[all[i].fr])
		{
			tar::find_bridge(all[i].fr, -1, -1);
		}
		if (tar::bIsCut[all[i].rank])
		{
			ans[all[i].rank] = 1;
		}
		set::combine(all[i].fr, all[i].to);
		map.iHead[all[i].fr] = 0;
	}
}

int main()
{
	read(n); read(m);
	for (int i(1); i <= n; ++i) set::belong[i] = i;
	for (int i(0); i != m; ++i)
	{
		READ_3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	map.add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	map.add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i)
	{
		all[i].fr = set::find(all[i].fr);
		all[i].to = set::find(all[i].to);
		if (all[i].len == all[i - 1].len)
		{
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
		else
		{
			judge(front, i);
			front = i;
			if (set::find(all[i].fr) == set::find(all[i].to))
			{
				ans[all[i].rank] = -1;
			}
			else
			{
				map.add(all[i].fr, all[i].to, all[i].len, all[i].rank);
				map.add(all[i].to, all[i].fr, all[i].len, all[i].rank);
				tar::vistime[all[i].fr] = tar::vistime[all[i].to] = 0;
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i)
	{
		if (ans[i] == -1) puts("none");
		else if (ans[i] == 0) puts("at least one");
		else puts("any");
	}
	//PAUSE
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define READ2(a, b) read(a);read(b)
#define READ3(a, b, c) read(a);read(b);read(c)
#define WRITE(a) puts(a)

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int remain_next[112345], remain_front[112345];

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	Tarjan::nowtime = 1;
	for (int i(remain_next[0]); i <= n; i = remain_next[i]) {
		if (Tarjan::bVis[find(i)] ^ Tarjan::NextVis) {
			Tarjan::find_cut(find(i), 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

inline void read(int& v)
{
	char c(getchar());
	while (c < '0' || c > '9') c = getchar();
	v = c - '0'; c = getchar();
	while (c >= '0' && c <= '9') {
		v = v * 10 + c - '0';
		c = getchar();
	}
}

int main()
{
	READ2(n, m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
		remain_next[i - 1] = i;
		remain_front[i] = i - 1;
	}
	remain_next[n] = n + 1;
	for (int i(0); i != m; ++i) {
		READ3(all[i].fr, all[i].to, all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		int f(find(all[i].fr)), t(find(all[i].to));
		if (all[i].len == all[i - 1].len) {
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				int f(find(all[j].fr)), t(find(all[j].to));
				if (f == t) continue;
				combine(f, t);
				remain_next[remain_front[t]] = remain_next[t];
				remain_front[remain_next[t]] = remain_front[t];
				iHead[f] = 0;
			}
			front = i;
			f = find(all[i].fr); t = find(all[i].to);
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) WRITE("none");
		if (ans[i] == 0) WRITE("at least one");
		if (ans[i] == 1) WRITE("any");
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>

#include <algorithm>

#define FOR_EDGE(i, pt) for (int i(iHead[pt]); i; i = all[i].next)

int belong[112345];

int find(int n)
{
	return belong[n] == n ? n : belong[n] = find(belong[n]);
}

void combine(int a, int b)
{
	int f(find(a)), ff(find(b));
	if (f != ff) {
		belong[ff] = f;
	}
}

class edge
{
public:
	int fr, to, len, next, rank;
	bool operator<(const edge& x) const
	{
		return len < x.len;
	}
}all[1123456];
int iEnd;
int iHead[112345];
void add(int fr, int to, int len, int rk)
{
	all[iEnd].fr = fr;
	all[iEnd].to = to;
	all[iEnd].len = len;
	all[iEnd].rank = rk;
	all[iEnd].next = iHead[fr];
	iHead[fr] = iEnd++;
}
inline void GetMin(int& a, int b) { if (a > b) a = b; }
namespace Tarjan
{
	bool bIsCut[112345];

	int bVis[112345], NextVis;
	int low[112345], vistime[112345], nowtime(1);
	void find_cut(int now, int fr, int edrk)
	{
		bVis[now] = NextVis;
		vistime[now] = nowtime;
		low[now] = nowtime++;
		int tofth(0);
		FOR_EDGE(i, now) {
			if (bVis[find(all[i].to)] ^ NextVis) {
				find_cut(find(all[i].to), now, i);
				GetMin(low[now], low[find(all[i].to)]);
			} else {
				if (find(all[i].to) == fr) {
					++tofth;
				} else {
					GetMin(low[now], vistime[find(all[i].to)]);
				}
			}
		}
		if (edrk != -1 && tofth == 1 && low[now] > vistime[fr]) {
			bIsCut[all[edrk].rank] = true;
		}
	}
}

int ans[112345];
int n, m, front;
void judge(int fr, int to)
{
	++Tarjan::NextVis;
	Tarjan::nowtime = 1;
	for (int i(1); i <= n; ++i) {
		if (Tarjan::bVis[find(i)] ^ Tarjan::NextVis) {
			Tarjan::find_cut(find(i), 0, -1);
		}
	}
	for (int i(fr); i != to; ++i) {
		if (Tarjan::bIsCut[all[i].rank]) {
			ans[all[i].rank] = 1;
		}
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	iEnd = m;
	for (int i(1); i <= n; ++i) {
		belong[i] = i;
	}
	for (int i(0); i != m; ++i) {
		scanf("%d%d%d", &all[i].fr, &all[i].to, &all[i].len);
		all[i].rank = i;
	}
	std::sort(all, all + m);
	add(all[0].fr, all[0].to, all[0].len, all[0].rank);
	add(all[0].to, all[0].fr, all[0].len, all[0].rank);
	for (int i(1); i != m; ++i) {
		int f(find(all[i].fr)), t(find(all[i].to));
		if (all[i].len == all[i - 1].len) {
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		} else {
			judge(front, i);
			for (int j(front); j != i; ++j) {
				combine(find(all[j].fr), find(all[j].to));
				iHead[find(all[j].fr)] = 0;
			}
			front = i;
			f = find(all[i].fr); t = find(all[i].to);
			if (f == t) ans[all[i].rank] = -1;
			else {
				add(f, t, all[i].len, all[i].rank);
				add(t, f, all[i].len, all[i].rank);
			}
		}
	}
	judge(front, m);
	for (int i(0); i != m; ++i) {
		if (ans[i] == -1) printf("none\n");
		if (ans[i] == 0) printf("at least one\n");
		if (ans[i] == 1) printf("any\n");
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
set<int> st;
int main() {
    int n, x, num = 0;
    cin >> n;
    while (n--) {
        cin >> x;
        st.insert(x);
    }
    set<int> :: iterator ite = st.begin();
    while (ite != st.end()) {
        num++;
        if (num == 2) { cout << *ite << endl; break; }
        *ite++;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int n;
	cin>>n;
	int num[n];
	for(int i=0;i<n;i++){
		cin>>num[i];
	}
	sort(num,num+n);
	int small=num[0];
	for(int i=0;i<n;i++){
		if(num[i]!=small){
			cout<<num[i];
			return 0;
		}
	}
	cout<<"NO";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[10001];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	sort(a+1,a+1+n);
	unique(a+1,a+1+n);
	cout<<a[n-2];
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a[n+1],i;
    for (i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+n+1);
	for(i=1;i<=n;i++)
    {
        if(a[i]>a[1])
        {
        	cout<<a[i];
        	return 0;
		}
	}
	cout<<"NO";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int a[n],i;
    for (i=0;i<n;i++){
        cin >> a[i];
    }
    sort(a+1,a+n+1);
	if(n<2){
		cout<<"NO";
    }else{
    	cout<<a[1];
    }
    return 0;
}


#include<cstdio>
#include<iostream>

using namespace std;

int n;

int main()
{
	scanf("%d",&n);

	int m[n+1];

	for(int i=1;i<=n;i++)  scanf("%d",&m[i]);

	for(int i=n;i>=1;i--)  for(int j=1;j<=n-i;j++)  if(m[i]>m[i+1])  swap(m[i],m[i+1]);

	int t=m[1];

	for(int i=1;i<=n;i++)  if(i!=t&&i>t){printf("%d",i);break;}

	//for(int i=1;i<=n;i++)  cout<<m[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	sort(a+1,a+n+1);
	for(int i=1;i<=n;i++){
		if(a[i]!=a[i-1]) printf("%d",&a[i]);
		return 0;
	}
	printf("%s","NO");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int s[305],kk=0;
int main(){
 	 int k;
 	 cin>>k;
 	 for(int i=1;i<=k;i++)
 	 	scanf("%d",&s[i]);
 	  sort(s+1,s+k+1);
 	  for(int i=1;i<=k;i++){
 	  		  if(s[i]!=s[i-1])kk++;
				 if(kk==2)cout<<s[i],exit(0);
 	  }
 	  cout<<"NO";
}


#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[200];
	for(int i=1;i<=n;i++)
		cin>>a[i];
	sort(a+1,a+1+n);
	for(int i=2;i<=n;i++)
	{
		if(a[i] != a[i-1])
		{
			cout<<a[i];
			return 0;
		}
	}
	cout<<"NO";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int n,x;
set<int> s;
int main ()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        s.insert(x);
    }
    s.erase(s.begin());
    if(s.empty())
        cout<<"NO";
    else
        cout<<*s.begin()<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<cstdlib>
using namespace std;
int a[101],n,ans;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++) cin>>a[i];
	sort(a+1,a+n+1);
	for(int i=1;i<=n;i++){
		ans++;
		if(a[i]==a[i-1]) ans--;
		if(ans==2){
			cout<<a[i];
			return 0;
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
priority_queue <int,vector<int>,less<int> > q;
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		int x;cin>>x;q.push(x);
	}
	q.pop();
	cout<<q.top();
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<cstdlib>
using namespace std;
int a[101],n,ans;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++) cin>>a[i];
	sort(a+1,a+n+1);
	for(int i=2;i<=n;i++){
		if(a[i]!=a[i-1]) ans++;
		if(ans==2){
			cout<<a[i-1];
			return 0;
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
int n,x;
set<int> s;
int main ()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        s.insert(x);
    }
    s.erase(s.begin());
    if(s.empty())
        cout<<"No";
    else
        cout<<*s.begin()<<endl;
    return 0;
}


#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;
int main(){
    int a[1001],n,s=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    scanf("%d",&a[i]);
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        if(a[i]==a[i+1])
        a[i]=0;
    }
    for(int i=1;i<=n;i++){
        if(a[i]!=0)
        ++s;
        if(s==2){
            printf("%d\n",a[i]);
            return 0;
        }
    }
    printf("NO\n");
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
int f[1000];
int k;
int main()
{
	scanf("%d",&k);
	for(int i=1;i<=k;i++){
		scanf("%d",&f[i]);
	}
	sort(f+1,f+1+k);
	int x=1;
	while(f[x]==f[x+1]) x++;
	if(x+1<=k) printf("%d",f[x+1]);
	else printf("NO");
	return 0;
}


/*(^-^)*/
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<vector>
#include<cctype>
#include<string>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define ll long long
ll n,a[105];

int main()
{
    scanf("%lld",&n);
    for(ll i=1;i<=n;i++)
    {
        scanf("%lld",&a[i]);
    }
    sort(a+1,a+1+n);
    ll x=a[1];
    for(ll i=1;i<=n;i++)
    {
        if(a[i]!=x){printf("%lld",a[i]);return 0;}
    }
    printf("NO");
    return 0;
}


#include <cstdio>
#include<algorithm>
using namespace std;
bool cmp(int x,int y)
{
	return x < y;
}
int main()
{
	int a[1001],n;
	scanf("%d",&n);
	for(int i = 1;i <= n;i++)
	{
		scanf("%d",&a[i]);
	}
	sort(a + 1,a + n + 1,cmp);
	for(int i = 1;i <= n;i++)
	{
		if(a[i] != a[i + 1])
		{
			printf("%d",a[i + 1]);
			return 0;
		}
		else
		{
			printf("NO");
			return 0;
		}
	}
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<stdio.h>
using namespace std;
int n,s[11111];
bool cmp(int cl,int cr)
{return cl>cr;
}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&s[i]);
	sort(s+1,s+1+n,cmp);
	for(int i=n-1;i>=1;i--)
	{
		if(s[i]!=s[n])
		{
			printf("%d",s[i]);
			return 0;
		}
	}
	printf("NO");
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int a,m[1000],MAXN=1e9,MAXN2=1e9;
int main(){
	cin>>a;
	for(int i=1;i<=a;i++){
		cin>>m[i];
		if(m[i]<MAXN)MAXN=m[i];
	}
	sort(m+1,m+a+1);
	for(int i=1;i<=a;i++)if(m[i]!=MAXN){MAXN2=m[i];break;}
	if(MAXN2!=1e9)cout<<MAXN2<<endl;
	else cout<<"NO"<<endl;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
using namespace std;

priority_queue <int, vector<int >, greater<int > > q;

int n;
bool flag[2][110] = { false };

int main() {
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i) {
		int t;
		scanf("%d", &t);
		if (!flag[t > 0][abs(t)]) q.push(t);
		flag[t > 0][abs(t)] = true;
	}
	if (q.size() < 2) printf("NO");
	else {
		q.pop();
		printf("%d", q.top());
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    vector<int> num;
    cin >> n;
    for(int i = 0;i < n;i ++)
    {
        int temp;
        cin >> temp;
        num.push_back(temp);
    }
    sort(num.begin(),num.end());
    auto last = unique(num.begin(),num.end());
    num.erase(last,num.end());
    num.pop_back();
    if(!num.empty())
    {
        cout << num.back();
    }
    else
    {
        cout << "NO";
    }
}


#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n,i,a[101];
	cin>>n;
	for(i=1;i<=n;i++) cin>>a[i];
	sort(a+1,a+n+1);
	cout<<a[2];
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool cmp(int c,int b)
{
	return c>b;
}
int a[105];
int main()
{
	int n,s,k;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n,cmp);
	k=a[0];
	for(int i=0;i<n;i++)
	{
		if(a[i]==k)continue;
		else {cout<<a[i]<<endl;return 0;}
	}
	cout<<"NO"<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[110];
bool cmp(int a,int b){
	return a>b;
}
int main(){
	cin>>n;
	for(int i=0;i<n;++i) cin>>a[i];
	sort(a,a+n,cmp);
	for(int i=1;i<n;++i){
		if(a[i]!=a[i-1]){
			cout<<a[i]<<endl;
			return 0;
		}
	}
	cout<<"NO"<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main (){
	int a[105];
	int n;
	scanf ("%d",&n);
	for (int i=0;i<n;i++){
	scanf ("%d",&a[i]);
	}
	sort (a,a+n);
	int x=a[0];
	for (int i=1;i<n;i++){
	if (a[i]<100&&abs(a[i])<100&&a[i]>x){
	printf ("%d",a[i]);
	return 0;
	}}
	printf ("NO");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b[10005],c=0,ans;
	cin>>a;
	for(int i=0;i<a;i++)
	{
		cin>>b[i];
	}
	sort(b,b+a);
	int i=0;
	while(c!=2)
	{
		if(b[i]!=b[i+1])c++;
		ans=b[i];
		i++;
	}
	cout<<ans;

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int d[100+10];
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",d+i);
	int ans=0x7fffffff,di;
	for(int i=0;i<n;i++)
			if(ans>d[i])ans=d[i],di=i;
	d[di]=0x7fffffff,ans=0x7fffffff;
	for(int i=0;i<n;i++)
			if(ans>d[i])ans=d[i];

//	for(int i=0;i<n;i++)
//			if(ans==d[i])
//			{
//				printf("%d",ans);
//				return 0;
//			}
	printf("%d",ans);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int a[1000001];
int main()
{
	int n,x;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	sort(a+1,a+n+1);
	x=a[1];
	for(int i=2;i<=n;i++)
	{
		if(a[i]>x)
		{
			cout<<a[i];
			break;
		}
		if(i==n&&a[i]<=x) cout<<"NO"<<endl;
	}
	return 0;
}


#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<assert.h>
#include<set>
#include<cmath>
#include<queue>
#include<cstdlib>
#include<iostream>
#include<bitset>
#include<stack>
#define pii pair<int,int>
#define fi first
#define se second
#define pb push_back
#define rep(i,j,k) for(int i=(int)(j);i<=(int)(k);i++)
#define per(i,j,k) for(int i=(int)(j);i>=(int)(k);i--)
using namespace std;
typedef long long LL;
typedef double db;
int main()
{
	int n;
	cin>>n;
	set<int> p;
	for(int i=0;i<n;i++){
		int t;
		cin>>t;
		p.insert(t);
	}
	int k=1;
	for(set<int>::iterator it1=p.begin();it1!=p.end();it1++,k++){
		if(k==2){
			cout<<*it1<<endl;
			return 0;
		}
	}
	cout<<"NO\n";
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    long long n;
    vector<long long> num;
    cin >> n;
    for(int i = 0;i < n;i ++)
    {
        long long temp;
        cin >> temp;
        num.push_back(temp);
    }
    sort(num.begin(),num.end());
    auto last = unique(num.begin(),num.end());
    num.erase(last,num.end());
    num.pop_back();
    if(!num.empty())
    {
        cout << num.back();
    }
    else
    {
        cout << "NO";
    }
}


#include<bits/stdc++.h>
using namespace std;
int n,a[101];
int main()
{
	cin>>n;
	for(int i=0;i<n;i++) cin>>a[i];
	sort(a,a+n);
	int max=a[0];
	for(int i=1;i<n;i++){
		if(a[i]!=a[i-1]){
			cout<<a[i];
			return 0;
		}
	}cout<<"NO"<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool zpl[205];
int main(){
	int n;
	cin>>n;
	for(int i=0; i<n; i++){
		int buf;
		cin>>buf;
		zpl[buf+100] = true;
	}
	char tic = 0;
	for(int i=0; i<=200; i++){
		if(zpl[i]){
			tic++;
			if(tic == 2){
				cout<<i-100;
				return 0;
			}
		}
	}
	cout<<"NO";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[200];
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int x;
		cin>>x;
		a[x+100]=1;
	}
	int t=0;
	for(int i=0;i<=200;i++)
	{
		if(a[i]!=0)
		{
			t++;
			if(t==2)
			{
				cout<<i-100<<endl;
				return 0;
			}

		}
	}
	cout<<"NO"<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int k[101];
int main(){
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>k[i];
	sort(k+1,k+n+1);
	for(i=2;i<=n;i++)
		if(k[i]!=k[i-1]){
			cout<<k[i];
			return 0;
		}
	cout<<"NO";
}


#include<iostream>
using namespace std;
int a[101],n,i,b,s=0;
int main(){
	cin>>n;
	for(i=1;i<=n;i++){
		cin>>b;
		a[b]++;
	}
	for(i=1;i<=n;i++){
		if(a[i]>0){
			if(s=2){
				cout<<i;
				break;
			}
			s++;
		}
	}
}