#include <bits/stdc++.h>
using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  mt19937 rng(7122);
  constexpr int kIter = 100;
  while (t--) {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> g(n);
    for (int i = 0; i < m; ++i) {
      int u, v;
      cin >> u >> v;
      u--, v--;
      g[u].push_back(v);
    }
    vector<int> ord(n);
    iota(ord.begin(), ord.end(), 0);
    shuffle(ord.begin(), ord.end(), rng);
    vector<int> dep(n, -1);

    auto Check = [&](int x) {
      fill(dep.begin(), dep.end(), -1);
      dep[x] = 0;
      bool res = true;
      auto Dfs = [&](auto dfs, int x) -> void {
        for (int u : g[x]) {
          if (dep[u] == -1) {
            dep[u] = dep[x] + 1;
            dfs(dfs, u);
          } else {
            res &= dep[u] < dep[x];
          }
        }
      };
      Dfs(Dfs, x);
      return res;
    };

    int root = -1;
    for (int i = 0; i < min(n, kIter); ++i) {
      if (Check(ord[i])) {
        root = ord[i];
        break;
      }
    }
    if (root == -1) {
      cout << -1 << "\n";
      continue;
    }
    vector<pair<int, int>> dp(n, make_pair(-1, -1));

    auto Update = [&](auto &p, int u) {
      if (u == -1) return;
      if (p.first == -1 || dep[u] < dep[p.first]) {
        p.second = p.first;
        p.first = u;
      } else if (p.second == -1 || dep[u] < dep[p.second]) {
        p.second = u;
      }
    };
    
    auto Dfs = [&](auto dfs, int x) -> void {
      for (int u : g[x]) {
        if (dep[u] == dep[x] + 1) {
          dfs(dfs, u);
          Update(dp[x], dp[u].first);
          Update(dp[x], dp[u].second);
        } else {
          assert(dep[u] < dep[x]);
          Update(dp[x], u);
        }
      }
    };

    Dfs(Dfs, root);

    bool ok = true;
    vector<bool> good(n);
    sort(ord.begin(), ord.end(), [&](int i, int j) { return dep[i] < dep[j]; });
    for (int i = 0; i < n; ++i) {
      int x = ord[i];
      int cnt = 0, link = -1;
      if (dp[x].first != -1 && dep[dp[x].first] < dep[x]) {
        link = dp[x].first;
        cnt++;
      }
      if (dp[x].second != -1 && dep[dp[x].second] < dep[x]) {
        link = dp[x].second;
        cnt++;
      }
      if (cnt == 2) {
        good[x] = false;
      } else {
        if (cnt == 0) good[x] = x == root;
        else good[x] = good[link];
      }
    }
    vector<int> res;
    for (int i = 0; i < n; ++i) {
      if (good[i]) {
        res.push_back(i);
      }
    }
    sort(res.begin(), res.end());
    if (res.size() * 5 < n) {
      cout << "-1\n";
    } else {
      for (int u : res) cout << u + 1 << " ";
      cout << "\n";
    }
  }
  return 0;
}
