#include <bits/stdc++.h>
namespace my_std {
using namespace std;
#define reg register
#define Rint register int
#define FOR(i, a, b) for (register int i = (a), ed_##i = (b); i <= ed_##i; ++i)
#define ROF(i, a, b) for (register int i = (a), ed_##i = (b); i >= ed_##i; --i)
#define FORit(templ, arr, i, a, b) \
for (register templ *i = (arr) + (a), *ed_##i = (arr) + (b) + 1; i != ed_##i; ++i)
#define ROFit(templ, arr, i, a, b) \
for (register templ *i = (arr) + (a), *ed_##i = (arr) + (b)-1; i != ed_##i; --i)
#define GO(x, p, e, i, v) for (register int i = p[x].head, v; i; i = e[i].link)
#define MEM(x, v) memset(x, v, sizeof(x))
#define fir first
#define sec second
#define pq priority_queue
#define MP make_pair
typedef long long LL;
typedef double DB;
typedef pair<int, int> PII;
#define Templ(T) template <typename T>
inline int read() {
    reg int ans = 0, f = 1;
    reg char c = getchar();
    while (!isdigit(c)) f ^= (c == '-'), c = getchar();
    for (; isdigit(c); c = getchar()) ans = (ans << 1) + (ans << 3) + (c ^ 48);
    return f ? ans : -ans;
}
Templ(_Tp) inline int chkmin(_Tp &x, _Tp y) { return x > y ? x = y, 1 : 0; }
Templ(_Tp) inline int chkmax(_Tp &x, _Tp y) { return x < y ? x = y, 1 : 0; }
#define using_mod
const int mod = 998244353;
#ifdef using_mod
inline void inc(int &x, const int &y) { x += y; if (x >= mod) x -= mod; }
inline void dec(int &x, const int &y) { x -= y; if (x < 0) x += mod; }
inline int ksm(int x, LL y) {
    int res = 1;
    for (; y; y >>= 1, x = 1ll * x * x % mod)
        if (y & 1) res = 1ll * res * x % mod;
    return res;
}
#endif
Templ(_Tp) inline _Tp gcd(_Tp x, _Tp y) { return y ? gcd(y, x % y) : x; }
#define FILE(s) freopen(s ".in", "r", stdin), freopen(s ".out", "w", stdout)
#define PBTXDY
} // namespace my_std
using namespace my_std;
 
// mt19937 mt(time(0));
 
inline int rnd(){
	// return mt();
	static unsigned int range = 0x1234567u;
	range <<= 13, range ^= 0xeae1e4au;
	range >>= 11, range ^= 0x65bbc19u;
	range <<= 9, range ^= 0xca58bb4u;
	range >>= 3, range ^= 0x14a28b8u;
	return range ^ 0xffffff;
}
 
const int N = 50010;
int n, m;
vector<int> E[N];
int fth[N], vis[N], val[N], ans[N], dep[N], ht[N];
 
int flag;
inline void dfs(const int &u){
	vis[u] = 1;
	for(Rint v: E[u]){
		if(!vis[v]){
			fth[v] = u;
			dep[v] = dep[u] + 1;
			dfs(v);
		}
		else if(vis[v] == 2){
			flag = 0;
			// printf("! %d %d\n", u, v);
		}
	}
	vis[u] = 2;
}
 
inline int get_ans(const int &rt){
	memset(fth + 1, 0, sizeof(int) * n);
	memset(vis + 1, 0, sizeof(int) * n);
	memset(dep + 1, 0, sizeof(int) * n);
	flag = 1;
	dfs(rt);
	return flag ? 1 : -1;
}
 
inline int find_an_answer(){
	memset(ans + 1, 0, sizeof(int) * n);
	Rint u;
	FOR(o, 1, 300){
		u = rnd() % n + 1;
		if(ans[u] != 0) continue;
		ans[u] = get_ans(u);
		// printf("get_ans(%d) = %d\n", u, ans[u]);
		if(ans[u] == 1) return u;
	}
	return 0;
}
 
inline void find_all_answer1(const int &u){
	ht[u] = u;
	for(Rint v: E[u]){
		if(fth[v] == u){
			find_all_answer1(v);
			val[u] += val[v];
			if(dep[ht[v]] < dep[ht[u]]){
				ht[u] = ht[v];
			}
		}
		else if(dep[v] < dep[ht[u]]){
			ht[u] = v;
		}
	}
	ans[u] = val[u] < 2;
}
inline void find_all_answer2(const int &u){
	if(!ans[ht[u]]) ans[u] = 0;
	for(Rint v: E[u]){
		if(fth[v] == u) find_all_answer2(v);
	}
}
 
inline void work(){
	n = read(), m = read();
	Rint u, v;
	FOR(i, 1, n) E[i].clear();
	// FOR(i, 1, n) E[i].resize(0);
	FOR(i, 1, m){
		u = read(), v = read();
		E[u].push_back(v);
	}
	const int rt = find_an_answer();
	// puts("find_an_answer ending");
	// printf("find_an_answer ending with %d\n", rt);
	if(!rt) return puts("-1"), void();
	memset(val + 1, 0, sizeof(int) * n);
	FOR(u, 1, n){
		for(Rint v: E[u]){
			if(fth[v] == u) continue;
			--val[v], ++val[u];
		}
		// E[u].clear();
	}
	// FOR(i, 1, n){
		// if(fth[i]) E[fth[i]].push_back(i);
	// }
	find_all_answer1(rt);
	find_all_answer2(rt);
	// puts("find_all_answer ending");
	Rint t = 0;
	FOR(i, 1, n) t += ans[i];
	if(t * 5 < n) return puts("-1"), void();
	FOR(i, 1, n){
		if(ans[i]) printf("%d ", i);
	}
	puts("");
}
 
int main() {
	int easc = read();
	while(easc--) work();
	return 0;
}