#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int rnd() { return rand() | (rand() << 15); }
unsigned long long Rnd() { return rnd() | ((unsigned long long)rnd() << 30); }
int T, n, m;
vector<int> G[N], E[N];
int in[N], out[N], tim;
unsigned long long d[N];
vector<pair<int, int> > e;
void dfs(int u) {
  in[u] = ++tim;
  E[u].clear();
  for (int v : G[u]) {
    if (in[v])
      e.push_back(pair<int, int>(u, v));
    else
      dfs(v), E[u].push_back(v);
  }
  out[u] = tim;
}
bool f[N];
void cope(int u) {
  for (int v : E[u]) cope(v), d[u] ^= d[v];
}
map<unsigned long long, int> mp;
vector<int> ans;
void work(int u) {
  if (mp.count(d[u])) {
    int z = mp[d[u]];
    f[u] = f[e[z].second];
    if (f[u]) ans.push_back(u);
  }
  for (int v : E[u]) work(v);
}
void Main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) G[i].clear();
  memset(f, 0, sizeof(bool) * (n + 1));
  for (int i = 1, u, v; i <= m; i++) scanf("%d%d", &u, &v), G[u].push_back(v);
  int T = 50;
  while (T--) {
    int rt = rnd() % n + 1;
    memset(in, 0, (n + 1) << 2);
    memset(d, 0, sizeof(unsigned long long) * (n + 1));
    tim = 0, e.clear();
    dfs(rt);
    bool ok = true;
    mp.clear();
    for (int i = 0; i < e.size(); i++) {
      int u = e[i].first, v = e[i].second;
      unsigned long long w = Rnd();
      mp[w] = i;
      if (in[v] > in[u] || out[v] < out[u])
        ok = false;
      else
        d[u] ^= w, d[v] ^= w;
    }
    if (!ok) continue;
    ans.clear();
    cope(rt), f[rt] = true, ans.push_back(rt), work(rt);
    if (ans.size() * 5 < n) break;
    for (int z : ans) cout << z << " ";
    puts("");
    return;
  }
  puts("-1");
}
int main() {
  cin >> T;
  while (T--) Main();
  return 0;
}
