#include<bits/stdc++.h>
#define PII pair<int,int>
#define DB double
#define LL long long
#define comp complex<double>
#define int long long
//#define int __int128
//const int mod=1e9+7;
//const int mod=998244353;
const LL inf=0x3f3f3f3f,INF=0x3f3f3f3f3f3f3f3f,Inf=0x66ccff66ccff;
const DB pi=acos(-1);
namespace FastIO{
inline int read(int mod=0){
int x=0,f=1;char ch=getchar();
if(mod==0){while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}}
else{while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=(x*10%mod+ch-48)%mod;ch=getchar();}}
return x*f;}
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
char buf[1<<23],*p1=buf,*p2=buf,obuf[1<<23],*O=obuf;
inline int rd(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
return x*f;
}//8(:D
}
using namespace FastIO;
using namespace std;
bool fl=0,vis[100005],inl[100005];
vector<int>g[100005],son[100005],tofa[100005],ttt;
multiset<int>ans;
int tmp[100005],n,m;
inline int getrnd(){return rand()*rand();}
void dfs(int x){
vis[x]=1,inl[x]=1,son[x].clear();
for(int y:g[x]){
if(vis[y]){
if(inl[y])tofa[x].push_back(y);
else fl=1;
continue;
}dfs(y),son[x].push_back(y);
}inl[x]=0;
}
void dfs2(int x){
int hson=0;
for(int y:son[x]){dfs2(y);
if(tofa[hson].size()<tofa[y].size())hson=y;
}if(hson)swap(tofa[hson],tofa[x]);
for(int y:son[x])for(int val:tofa[y])tofa[x].push_back(val);
swap(ttt,tofa[x]);for(int y:ttt)if(y!=x)tofa[x].push_back(y);ttt.clear();
if(tofa[x].size()==1)tmp[x]=*tofa[x].begin();
}
void dfs3(int x){
if(tmp[x]&&ans.count(tmp[x]))ans.insert(x);
for(int y:son[x])dfs3(y);
}
signed main(){
srand(time(0));
int t=read(0);
while(t--){
n=read(0),m=read(0);int T=50,root=0;
for(int i=1;i<=m;++i){
int u=read(0),v=read(0);
g[u].push_back(v);
}
while(T--){
root=getrnd()%n+1;fl=0;
for(int i=1;i<=n;++i)vis[i]=0,tofa[i].clear();
dfs(root);if(!fl)break;root=0;
}
if(!root)puts("-1");
else{
ans.clear();
for(int i=1;i<=n;++i)tmp[i]=0;
dfs2(root),ans.insert(root),dfs3(root);
if((int)ans.size()<(n+4)/5)puts("-1");
else{
for(int i:ans)printf("%lld ",i);
printf("\n");
}
}for(int i=1;i<=n;++i)g[i].clear();
}
return 0;
}