#include <bits/stdc++.h>
using namespace std;
template <class T>
void mini(T& a, T b) {
  a = min(a, b);
}
template <class T>
void maxi(T& a, T b) {
  a = max(a, b);
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  return out << a.first << " " << a.second;
}
template <class T>
ostream& operator<<(ostream& out, vector<T> a) {
  for (auto& i : a) out << i << " ";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, set<T> a) {
  for (auto& i : a) out << i << " ";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, map<T1, T2> a) {
  for (auto& i : a) out << i << " ";
  return out;
}
template <class T>
void out(T a) {
  cout << a << endl;
}
void out() { cout << "OK" << endl; }
const int N = 1e5 + 5;
const int ITERS = 100;
vector<int> g[N];
bool good[N];
bool bad[N];
int color[N];
mt19937 rnd;
vector<int> ans;
int n;
vector<int> up[N];
int dep[N];
multiset<int> a[N];
vector<pair<int, int> > after;
int dp[N];
void init() {
  ans.clear();
  after.clear();
  for (int i = 1; i <= n; i++) {
    g[i].clear();
    good[i] = 0;
    bad[i] = 0;
    color[i] = 0;
    up[i].clear();
    dep[i] = 0;
    a[i].clear();
    dp[i] = 0;
  }
}
bool check_dfs(int v) {
  color[v] = 1;
  for (int u : g[v]) {
    if (color[u] == 1) continue;
    if (color[u] == 2) return 0;
    if (!check_dfs(u)) return 0;
  }
  color[v] = 2;
  return 1;
}
bool check(int v) {
  for (int i = 1; i <= n; i++) color[i] = 0;
  return check_dfs(v);
}
void rebuild_dfs(int v) {
  color[v] = 1;
  vector<int> cur;
  for (int u : g[v]) {
    if (color[u] == 1) {
      up[v].push_back(u);
      dp[v] = u;
      continue;
    }
    cur.push_back(u);
    dep[u] = dep[v] + 1;
    rebuild_dfs(u);
    if (dep[dp[u]] < dep[v]) dp[v] = dp[u];
  }
  g[v] = cur;
  color[v] = 2;
}
void rebuild(int v) {
  for (int i = 1; i <= n; i++) {
    color[i] = 0;
    dep[i] = 0;
  }
  rebuild_dfs(v);
}
void dfs(int v) {
  for (int u : up[v]) {
    a[v].insert(dep[u]);
  }
  for (int u : g[v]) {
    dfs(u);
    if (a[u].size() > a[v].size()) {
      swap(a[u], a[v]);
    }
    for (int i : a[u]) a[v].insert(i);
  }
  while (!a[v].empty()) {
    auto it = a[v].end();
    it--;
    if (*it >= dep[v]) {
      a[v].erase(it);
    } else
      break;
  }
  if (a[v].size() == 1) {
    after.push_back({v, dp[v]});
  }
}
void Solve() {
  int m;
  cin >> n >> m;
  init();
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
  }
  int s = -1;
  for (int i = 1; i <= ITERS; i++) {
    int v = rnd() % n + 1;
    if (check(v)) {
      s = v;
      break;
    }
  }
  if (s == -1) {
    cout << "-1\n";
    return;
  }
  good[s] = 1;
  rebuild(s);
  dfs(s);
  reverse(after.begin(), after.end());
  for (pair<int, int> i : after) {
    int from = i.first;
    int to = i.second;
    if (good[to]) good[from] = 1;
  }
  for (int i = 1; i <= n; i++) {
    if (good[i]) ans.push_back(i);
  }
  if (ans.size() * 5 < n) {
    cout << "-1\n";
    return;
  }
  sort(ans.begin(), ans.end());
  for (int i : ans) cout << i << " ";
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    Solve();
  }
  return 0;
}
