#include <bits/stdc++.h>
using namespace std;
inline int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
template <typename tuple<int, int, int> >
inline istream& operator>>(istream& i, vector<tuple<int, int, int> >& v) {
  for (int j = 0; j < ((int)(v).size()); ++j) i >> v[j];
  return i;
}
template <typename tuple<int, int, int> >
string join(const vector<tuple<int, int, int> >& v) {
  stringstream s;
  for (int i = 0; i < ((int)(v).size()); ++i) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename tuple<int, int, int> >
inline ostream& operator<<(ostream& o, const vector<tuple<int, int, int> >& v) {
  if ((int)(v).size()) o << join(v);
  return o;
}
template <typename T1, typename T2>
inline istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}
template <typename T1, typename T2>
inline ostream& operator<<(ostream& o, const pair<T1, T2>& v) {
  return o << v.first << "," << v.second;
}
template <typename tuple<int, int, int> >
inline long long int suma(const vector<tuple<int, int, int> >& a) {
  long long int res(0);
  for (auto&& x : a) res += x;
  return res;
}
const double eps = 1e-10;
const long long int LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MX = 200005;
const int TS = 100;
random_device _rd;
struct xrand {
  static const uint64_t _x = 88172645463325252ull;
  uint64_t x;
  xrand() : x(_x ^ (_rd() + time(0))) {}
  xrand(uint64_t seed) : x(_x ^ seed) {}
  uint64_t get() {
    x = x ^ (x << 7);
    return x = x ^ (x >> 9);
  }
  int operator()(int n) { return get() % n; }
  int operator()(int l, int r) { return get() % (r - l + 1) + l; }
} rnd;
struct scc {
  int n, k;
  vector<vector<int> > to, ot, d, gt;
  vector<int> g, used, kv;
  scc(int n = 0) : n(n), to(n), ot(n) {}
  int inc() {
    to.push_back(vector<int>());
    ot.push_back(vector<int>());
    return n++;
  }
  void add(int a, int b) {
    to[a].push_back(b);
    ot[b].push_back(a);
  }
  void dfs(int v) {
    if (used[v]) return;
    used[v] = 1;
    for (int i = 0; i < ((int)(to[v]).size()); ++i) dfs(to[v][i]);
    kv[--k] = v;
  }
  void rfs(int v) {
    if (g[v] != -1) return;
    g[v] = k;
    d[k].push_back(v);
    for (int i = 0; i < ((int)(ot[v]).size()); ++i) rfs(ot[v][i]);
  }
  void init() {
    k = n;
    used = kv = vector<int>(n);
    g = vector<int>(n, -1);
    for (int i = 0; i < (n); ++i) dfs(i);
    for (int i = 0; i < (n); ++i)
      if (g[kv[i]] == -1) {
        d.push_back(vector<int>());
        rfs(kv[i]);
        k++;
      }
    gt = vector<vector<int> >(k);
    for (int i = 0; i < (n); ++i)
      for (int j = 0; j < ((int)(ot[i]).size()); ++j) {
        int v = g[ot[i][j]], u = g[i];
        if (v != u) gt[v].push_back(u);
      }
    for (int i = 0; i < (k); ++i) {
      sort(gt[i].begin(), gt[i].end());
      gt[i].erase(unique(gt[i].begin(), gt[i].end()), gt[i].end());
    }
  }
} g;
vector<vector<int> > to, ot;
vector<int> used;
bool dfs(int v) {
  used[v] = 1;
  for (int u : to[v]) {
    if (used[u] == 2) return false;
    if (used[u] == 1) continue;
    if (!dfs(u)) return false;
  }
  used[v] = 2;
  return true;
}
bool check(int r) {
  used = vector<int>((int)(to).size());
  return dfs(r) && used == vector<int>((int)(to).size(), 2);
}
vector<int> ng;
vector<int> deg;
vector<int> pa;
int gfs(int v) {
  int res = 0;
  used[v] = 1;
  for (int u : to[v]) {
    if (used[u]) {
      ++res;
      deg[u]++;
      continue;
    }
    pa[u] = v;
    res += gfs(u);
  }
  res -= deg[v];
  if (res > 1) ng[v] = 1;
  return res;
}
void nfs(int v) {
  used[v] = 1;
  if (ng[v]) {
    for (int u : ot[v]) {
      if (u == pa[v]) continue;
      int x = u;
      while (x != v && ng[x] != 2) {
        ng[x] = 2;
        x = pa[x];
      }
    }
  }
  for (int u : to[v]) {
    if (used[u]) continue;
    nfs(u);
  }
}
void solve() {
  int n, m;
  scanf("%d%d", &n, &m);
  to = ot = vector<vector<int> >(n);
  g = scc(n);
  for (int i = 0; i < (m); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    to[a].push_back(b);
    ot[b].push_back(a);
    g.add(a, b);
  }
  g.init();
  for (int ti = 0; ti < (TS); ++ti) {
    int r = g.d[0][rnd((int)(g.d[0]).size())];
    r = 0;
    if (!check(r)) continue;
    used = vector<int>(n);
    deg = vector<int>(n);
    ng = vector<int>(n);
    pa = vector<int>(n);
    gfs(r);
    used = vector<int>(n);
    nfs(r);
    vector<int> ans;
    for (int i = 0; i < (n); ++i)
      if (g.g[i] == 0 && !ng[i]) ans.push_back(i + 1);
    if ((int)(ans).size() * 5 < n)
      cout << -1 << endl;
    else
      cout << ans << endl;
    return;
  }
  cout << -1 << endl;
}
int main() {
  int ts;
  scanf("%d", &ts);
  for (int ti = 0; ti < (ts); ++ti) solve();
  return 0;
}
