#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], radj[maxn];
int n, m;
int q;
int ok[maxn];
int par[maxn][2];
int h[maxn];
int mark[maxn];
int start[maxn], finish[maxn];
int t, cnt, good;
struct stt {
  int a[2] = {-1, -1};
  int count(int x) { return (a[0] == x or a[1] == x); }
  void erase(int x) {
    if (a[0] == x) {
      a[0] = -1;
    }
    if (a[1] == x) {
      a[1] = -1;
    }
  }
  void clear() { a[0] = a[1] = -1; }
  int size() { return (int(a[0] != -1) + int(a[1] != -1)); }
  void insert(int x) {
    if (a[0] == -1) {
      a[0] = x;
      return;
    } else if (a[1] == -1) {
      a[1] = x;
      return;
    }
    if (h[a[0]] < h[x]) {
      a[0] = x;
      return;
    }
    if (h[a[1]] < h[x]) {
      a[1] = x;
      return;
    }
  }
} st[maxn];
void init(int n) {
  for (int i = 1; i <= n; i++) {
    adj[i].clear();
    ok[i] = 1;
    par[i][0] = par[i][1] = -1;
    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 (++cnt < 2);
  }
  return (0);
}
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 merge(int v, int u) {
  if (st[u].count(v)) st[u].erase(v);
  if (st[u].a[0] != -1) {
    st[v].insert(st[u].a[0]);
  }
  if (st[u].a[1] != -1) {
    st[v].insert(st[u].a[1]);
  }
}
void solve(int v, int p = 0) {
  mark[v] = 1;
  st[v].clear();
  for (auto u : adj[v])
    if (mark[u]) st[v].insert(u);
  for (auto u : adj[v])
    if (!mark[u]) solve(u);
  for (auto u : adj[v]) merge(v, u);
  if (st[v].size() > 1) ok[v] = 0, good--;
}
void tof(int v, int val = 1) {
  mark[v] = 1;
  ok[v] = val;
  for (auto u : radj[v]) {
    if (!mark[u]) {
      tof(u, val & ok[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);
      radj[v].push_back(u);
    }
    int v;
    good = n;
    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);
    v = 1;
    solve(v);
    fill(mark, mark + n + 1, 0);
    tof(v, 1);
    if (good < n / 5) {
      cout << -1 << '\n';
      continue;
    }
    for (int i = 1; i <= n; i++)
      if (ok[i]) cout << i << ' ';
    cout << '\n';
  }
  return (0);
}
