#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
const int N = 100005;
int n, m;
vector<int> e[N];
int vis[N], inst[N];
int dep[N];
int dfs(int x, int d = 1) {
  vis[x] = d;
  inst[x] = 1;
  for (auto i : e[x]) {
    if (!vis[i]) {
      if (!dfs(i, d + 1)) return 0;
    } else if (!inst[i])
      return 0;
  }
  inst[x] = 0;
  return 1;
}
int check(int x) {
  for (int i = (1); i <= (n); i++) vis[i] = inst[i] = 0;
  return dfs(x);
}
int tmp[N], top[N];
vector<int> ans;
int _z_kill[N];
int solve(int x) {
  int now = 0;
  vis[x] = 1;
  top[x] = x;
  for (auto i : e[x])
    if (!vis[i])
      now += solve(i);
    else {
      now++, tmp[i]++;
      if (dep[i] < dep[top[x]]) top[x] = i;
    }
  now -= tmp[x];
  if (now > 1) _z_kill[x] = 1;
  return now;
}
void gao(int x) {
  vis[x] = 1;
  if (_z_kill[top[x]]) _z_kill[x] = 1;
  for (auto i : e[x])
    if (!vis[i]) gao(i);
}
void Solve() {
  n = read(), m = read();
  for (int i = (1); i <= (n); i++) e[i].clear();
  for (int i = (1); i <= (m); i++) {
    int a = read(), b = read();
    e[a].push_back(b);
  }
  vector<int> a;
  for (int i = (1); i <= (n); i++) a.push_back(i);
  random_shuffle(a.begin(), a.end());
  int t = 100, x = 0;
  for (auto i : a) {
    if (check(i)) {
      x = i;
      break;
    }
    if (!--t) break;
  }
  for (int i = (1); i <= (n); i++) dep[i] = vis[i];
  if (x == 0) {
    puts("-1");
    return;
  }
  for (int i = (1); i <= (n); i++) tmp[i] = vis[i] = _z_kill[i] = 0;
  solve(x);
  for (int i = (1); i <= (n); i++) vis[i] = 0;
  gao(x);
  ans.clear();
  for (int i = (1); i <= (n); i++)
    if (!_z_kill[i]) ans.push_back(i);
  sort(ans.begin(), ans.end());
  if ((int)ans.size() * 5 < n) return (void)puts("-1");
  for (auto i : ans) printf("%d ", i);
  puts("");
}
int main() {
  srand(114514);
  int T = read();
  while (T--) Solve();
  return 0;
}
