#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 20;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, m;
int vist[N];
vector<int> adj[N];
vector<int> graph[N];
multiset<int> ms;
vector<int> ans;
bool dfs1(int u) {
  vist[u] = 1;
  bool ans = true;
  for (int v : adj[u]) {
    if (vist[v] == 0)
      ans = dfs1(v) && ans;
    else if (vist[v] == 2)
      ans = false;
  }
  vist[u] = 2;
  return ans;
}
bool check(int r) {
  for (int i = int(0); i < int(n + 1); ++i) vist[i] = 0;
  return dfs1(r);
}
void dfs2(int u) {
  vist[u] = 1;
  for (int v : adj[u]) {
    if (vist[v] == 0)
      dfs2(v);
    else
      ms.insert(v);
  }
  ms.erase(u);
  if (int(ms.size()) == 1) {
    graph[*ms.begin()].push_back(u);
  }
}
void dfs3(int u) {
  ans.push_back(u);
  for (int v : graph[u]) {
    dfs3(v);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt;
  cin >> tt;
  while (tt--) {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
      int a, b;
      cin >> a >> b;
      adj[a].push_back(b);
    }
    int r = -1;
    vector<int> ops(n);
    iota(ops.begin(), ops.end(), 1);
    shuffle(ops.begin(), ops.end(), rng);
    for (int i = 0; i < min(n, 100); ++i) {
      if (check(ops[i])) {
        r = ops[i];
        break;
      }
    }
    if (r == -1) {
      cout << -1 << '\n';
    } else {
      for (int i = int(0); i < int(n + 1); ++i) vist[i] = 0;
      dfs2(r);
      dfs3(r);
      if (5 * int(ans.size()) < n) {
        cout << -1 << '\n';
      } else {
        sort(ans.begin(), ans.end());
        for (int x : ans) cout << x << " ";
        cout << '\n';
      }
    }
    ms.clear();
    ans.clear();
    for (int i = 1; i <= n; ++i) {
      adj[i].clear();
      graph[i].clear();
    }
  }
  return 0;
}
