#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
vector<int> x[MAXN];
int d[MAXN], y[MAXN];
bool z[MAXN];
vector<int> ans;
class SegTree {
 public:
  SegTree(int _n) : n(_n) {
    x = vector<int>(_n * 4);
    minv = vector<int>(_n * 4);
  }
  void Insert(int t, int a, int l, int r, int p, int q) {
    if (p <= l && r <= q) {
      minv[t] = a;
      return;
    }
    int mid = (l + r) >> 1;
    if (p <= mid) Insert(t + t, a, l, mid, p, q);
    if (mid + 1 <= q) Insert(t + t + 1, a, mid + 1, r, p, q);
    minv[t] = min(minv[t + t], minv[t + t + 1]);
  }
  int Query(int t, int l, int r, int p, int q) {
    if (p <= l && r <= q) return minv[t];
    int mid = (l + r) >> 1;
    int ans = n;
    if (p <= mid) ans = min(ans, Query(t + t, l, mid, p, q));
    if (mid + 1 <= q) ans = min(ans, Query(t + t + 1, mid + 1, r, p, q));
    return ans;
  }
  int n;
  vector<int> x;
  vector<int> minv;
};
bool Check(int a, int depth) {
  d[a] = depth;
  for (int b : x[a]) {
    if (z[b]) return false;
    if (d[b]) continue;
    if (!Check(b, depth + 1)) return false;
  }
  z[a] = true;
  return true;
}
int Mark(int a, int& cnt, SegTree& tree) {
  int upper = d[a];
  for (int b : x[a]) {
    if (d[b] < d[a]) {
      ++y[b];
      ++cnt;
      if (upper > d[b]) upper = d[b];
    }
  }
  tree.Insert(1, upper, 1, tree.n, d[a], d[a]);
  for (int b : x[a]) {
    if (d[b] < d[a]) continue;
    int count = 0;
    int temp = Mark(b, count, tree);
    if (upper > temp) upper = temp;
    cnt += count;
  }
  cnt -= y[a];
  if (cnt > 1) {
    z[a] = true;
  } else if (cnt == 1) {
    if (upper + 1 <= d[a] - 1 &&
        tree.Query(1, 1, tree.n, upper + 1, d[a] - 1) < upper) {
      z[a] = true;
    }
  }
  return upper;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int times;
  cin >> times;
  while (times--) {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i) x[i].clear();
    for (int i = 0; i < m; ++i) {
      int a, b;
      cin >> a >> b;
      x[a].push_back(b);
    }
    bool flag = false;
    for (int t = 0; t < 100; ++t) {
      int k = rand() % n + 1;
      for (int i = 1; i <= n; ++i) {
        z[i] = false;
        d[i] = 0;
      }
      if (Check(k, 1)) {
        for (int i = 1; i <= n; ++i) {
          z[i] = false;
          y[i] = 0;
        }
        flag = true;
        int count = 0;
        SegTree tree(n);
        Mark(k, count, tree);
        count = 0;
        for (int i = 1; i <= n; ++i) {
          if (z[i]) continue;
          ++count;
        }
        if (count * 5 < n) {
          cout << -1 << endl;
          break;
        }
        for (int i = 1; i <= n; ++i) {
          if (z[i]) continue;
          cout << i << " ";
        }
        cout << endl;
        break;
      }
    }
    if (!flag) {
      cout << -1 << endl;
    }
  }
  return 0;
}
