#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int MAGIC = 200;
vector<int> adj[MAXN];
int vis[MAXN], depth[MAXN], low[MAXN], cnt[MAXN], inter[MAXN], aux[MAXN];
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<int> res, lazy[MAXN];
void push(int u) {
  for (int v : lazy[u]) inter[v] = inter[u];
}
void go(int u, int d = 0) {
  vis[u] = 1;
  depth[u] = d;
  cnt[u] = 0;
  low[u] = u;
  int z = -1;
  for (int v : adj[u]) {
    if (!vis[v]) {
      go(v, d + 1);
      cnt[u] += cnt[v];
      if (depth[low[v]] < depth[low[u]]) low[u] = low[v];
    } else {
      if (depth[v] < depth[low[u]]) low[u] = v;
      aux[v]++;
      cnt[u]++;
      z = v;
    }
  }
  cnt[u] -= aux[u];
  if (cnt[u] >= 2 || (inter[low[u]] == 0 && depth[low[u]] < depth[u])) {
    inter[u] = 0;
    push(u);
  } else if (inter[low[u]] == 1) {
    inter[u] = 1;
    push(u);
  } else if (z != -1) {
    lazy[z].push_back(u);
  }
}
bool dfs(int u) {
  vis[u] = 1;
  for (int v : adj[u]) {
    if (vis[v] == 2) return false;
    if (vis[v] == 1) continue;
    bool ok = dfs(v);
    if (!ok) return false;
  }
  vis[u] = 2;
  return true;
}
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    adj[i].clear();
    lazy[i].clear();
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
  }
  uniform_int_distribution<int> distribution(0, n - 1);
  int root = -1;
  bool found = false;
  for (int iter = 0; iter < MAGIC; iter++) {
    root = distribution(rng);
    fill(vis, vis + n, 0);
    bool ok = dfs(root);
    if (ok) {
      found = true;
      break;
    }
  }
  if (!found) {
    cout << -1 << endl;
    return;
  }
  res.clear();
  fill(vis, vis + n, 0);
  fill(inter, inter + n, -1);
  fill(aux, aux + n, 0);
  inter[root] = 1;
  go(root);
  for (int i = 0; i < n; i++)
    if (inter[i]) res.push_back(i + 1);
  int k = res.size();
  if (5 * k < n) {
    cout << -1 << endl;
    return;
  }
  for (int x : res) {
    cout << x << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
