#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 123, inf = 1e9, mod = 1e9 + 7;
const long long INF = 1e18;
vector<int> g[N], gr[N];
int n, m, p[N], col[N], cur[N], pr[N];
bool good[N];
void dfs1(int v) {
  col[v] = 1;
  for (auto to : g[v]) {
    if (col[to] == 2) cur[to] = 1;
    if (col[to] == 1) continue;
    if (col[to] == 0) {
      pr[to] = v;
      dfs1(to);
    }
  }
  col[v] = 2;
}
void dfsr1(int v) {
  col[v] = 1;
  for (auto to : gr[v]) {
    if (col[to] == 2) cur[to] = 1;
    if (col[to] == 1) continue;
    if (col[to] == 0) {
      pr[to] = v;
      dfsr1(to);
    }
  }
  col[v] = 2;
}
void dfsr2(int v) {
  for (auto to : gr[v]) {
    if (pr[to] == v) {
      cur[to] |= cur[v];
      dfsr2(to);
    }
  }
}
void check(int v) {
  for (int i = 1; i <= n; i++) col[i] = cur[i] = 0;
  dfs1(v);
  for (int i = 1; i <= n; i++)
    if (cur[i]) good[v] = 0;
  for (int i = 1; i <= n; i++) col[i] = cur[i] = 0;
  dfsr1(v);
  pr[v] = 0;
  dfsr2(v);
  for (int i = 1; i <= n; i++)
    if (cur[i]) good[i] = 0;
}
int main() {
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) {
      g[i].clear();
      gr[i].clear();
      good[i] = 1;
      p[i] = i;
    }
    for (int i = 0; i < m; i++) {
      int v, u;
      scanf("%d%d", &v, &u);
      g[v].push_back(u);
      gr[u].push_back(v);
    }
    shuffle(p + 1, p + 1 + n, rng);
    for (int i = 1; i <= min(100, n); i++) check(p[i]);
    int k = 0;
    for (int i = 1; i <= n; i++)
      if (good[i]) k++;
    if (k * 5 < n)
      printf("-1\n");
    else {
      for (int i = 1; i <= n; i++)
        if (good[i]) printf("%d ", i);
      printf("\n");
    }
  }
}
