#include <bits/stdc++.h>
using namespace std;
vector<int> d[200005];
int mk[200005], us[200005], ln[200005], tot, n, m,
    pd = 0, fa[200005], mi1[200005], mi2[200005], ac[200005];
void clear() {
  for (int i = 1; i <= n; ++i) d[i].clear(), mk[i] = 0;
}
void dfs(int x, int f) {
  ln[x] = ++tot;
  ac[tot] = x;
  us[x] = 1;
  fa[x] = f;
  for (int i = 0; i < (int)d[x].size(); ++i) {
    int v = d[x][i];
    if (!ln[v])
      dfs(v, x);
    else
      pd &= us[v];
  }
  us[x] = 0;
}
void add(int x, int w) {
  if (w < mi1[x])
    mi2[x] = mi1[x], mi1[x] = w;
  else if (w < mi2[x])
    mi2[x] = w;
}
void dfs1(int x) {
  mi1[x] = mi2[x] = ln[x];
  for (int i = 0; i < (int)d[x].size(); ++i) {
    int v = d[x][i];
    if (fa[v] == x) {
      dfs1(v);
      add(x, mi1[v]);
      add(x, mi2[v]);
    } else if (ln[v] < ln[x])
      add(x, ln[v]);
  }
}
void dfs2(int x) {
  if (mi1[x] < ln[x] && mi2[x] >= ln[x]) mk[x] = mk[ac[mi1[x]]];
  for (int i = 0; i < (int)d[x].size(); ++i) {
    int v = d[x][i];
    if (fa[v] == x) dfs2(v);
  }
}
bool check(int x) {
  pd = 1;
  for (int i = 1; i <= n; ++i) ln[i] = us[i] = 0;
  tot = 0;
  dfs(x, 0);
  return pd;
}
void solve() {
  scanf("%d%d", &n, &m);
  for (int i = 1, x, y; i <= m; ++i) {
    scanf("%d%d", &x, &y);
    d[x].push_back(y);
  }
  for (int i = 1; i <= 100; ++i) {
    int x = rand() % n + 1;
    if (check(x)) {
      mk[x] = 1;
      dfs1(x);
      dfs2(x);
      break;
    }
  }
  int tot = 0;
  for (int i = 1; i <= n; ++i) tot += mk[i];
  if (tot * 5 > n) {
    for (int i = 1; i <= n; ++i)
      if (mk[i]) printf("%d ", i);
    puts("");
  } else
    puts("-1");
  clear();
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
