#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long maxn = 3e5;
const long long mod = 1e9 + 7;
const long double PI = acos((long double)-1);
long long pw(long long a, long long b, long long md = mod) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (a * res) % md;
    }
    a = (a * a) % md;
    b >>= 1;
  }
  return (res);
}
vector<int> adj[maxn];
int n, m, q, ok[maxn], par[maxn][2], h[maxn], mark[maxn], start[maxn],
    finish[maxn], t, good, cnt;
void init(int n) {
  h[0] = 1e9, ok[0] = 1;
  for (int i = 1; i <= n; i++) {
    adj[i].clear();
    ok[i] = 1;
    par[i][0] = par[i][1] = 0;
    mark[i] = 0;
  }
}
void dfs(int v) {
  mark[v] = 1;
  start[v] = ++t;
  for (auto u : adj[v])
    if (!mark[u]) {
      h[u] = h[v] + 1;
      dfs(u);
    }
  finish[v] = ++t;
}
bool chk(int u, int v) {
  if (start[u] < start[v] and finish[u] > finish[v] and h[u] + 1 == h[v])
    return (1);
  if (start[u] < start[v] and finish[u] > finish[v] and h[u] + 1 != h[v])
    return (0);
  if (start[v] < start[u] and finish[v] > finish[u]) {
    return (1);
  }
  return (0);
}
void merge(int v, int u) {
  if (u == v) return;
  if (h[par[v][1]] > h[u]) par[v][1] = u;
  if (h[par[v][0]] > h[par[v][1]]) swap(par[v][0], par[v][1]);
}
bool check(int v) {
  fill(mark, mark + n + 1, 0);
  h[v] = 0;
  t = 0;
  dfs(v);
  for (int i = 1; i <= n; i++) {
    cnt = 0;
    for (auto u : adj[i])
      if (!chk(i, u)) return (0);
  }
  return (1);
}
void solve(int v) {
  mark[v] = 1;
  for (auto u : adj[v])
    if (mark[u])
      merge(v, u);
    else
      solve(u), merge(v, par[u][0]), merge(v, par[u][1]);
  if (par[v][0] != 0 and par[v][1] != 0) ok[v] = 0;
}
void solve2(int v) {
  mark[v] = 1;
  ok[v] &= (ok[par[v][0]] & ok[par[v][1]]);
  for (auto u : adj[v])
    if (!mark[u]) solve2(u);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> q;
  while (q--) {
    cin >> n >> m;
    init(n);
    for (int i = 0; i < m; i++) {
      int u, v;
      cin >> u >> v;
      adj[u].push_back(v);
    }
    int v;
    for (int i = 0; i < 85; i++)
      if (check((v = (rng() % n + 1)))) break;
    if (!check(v)) {
      cout << -1 << '\n';
      continue;
    }
    fill(mark, mark + n + 1, 0);
    solve(v);
    fill(mark, mark + n + 1, 0);
    solve2(v);
    good = 0;
    for (int i = 1; i <= n; i++) good += ok[i];
    if (good * 5 < n) {
      cout << -1 << '\n';
      continue;
    }
    for (int i = 1; i <= n; i++)
      if (ok[i]) cout << i << ' ';
    cout << '\n';
  }
  return (0);
}
