#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
std::mt19937 rnd(19260817);
template <class T>
void cxk(T& a, T b) {
  a = a > b ? a : b;
}
template <class T>
void cnk(T& a, T b) {
  a = a < b ? a : b;
}
int fir[100010], dis[400010], nxt[400010], id = 1;
void link(int a, int b) { nxt[++id] = fir[a], fir[a] = id, dis[id] = b; }
int dfn[100010], idfn[100010], low[100010], clow[100010], ins[100010], tp;
bool ok;
void Cnk(int& mn, int& cmn, int x) {
  if (x < mn)
    cmn = mn, mn = x;
  else
    cnk(cmn, x);
}
std::vector<int> G[100010];
void tarjan(int x) {
  dfn[x] = low[x] = clow[x] = ++dfn[0];
  idfn[dfn[0]] = x;
  ins[x] = 1;
  for (int i = fir[x]; i; i = nxt[i]) {
    if (!dfn[dis[i]])
      tarjan(dis[i]), Cnk(low[x], clow[x], low[dis[i]]),
          Cnk(low[x], clow[x], clow[dis[i]]);
    else if (ins[dis[i]] && ins[dis[i]] <= ins[x])
      Cnk(low[x], clow[x], dfn[dis[i]]);
    else
      ok = 0;
  }
  ins[x] = 0;
  --tp;
}
bool yes[100010];
void DFS(int x) {
  for (int i : G[x]) yes[i] &= yes[x], DFS(i);
}
int main() {
  int qwq = gi();
  while (qwq--) {
    int n = gi(), m = gi(), u, v;
    while (m--) u = gi(), v = gi(), link(u, v);
    int T = 30;
    while (T--) {
      int x = rnd() % n + 1;
      memset(dfn, 0, n + 1 << 2);
      ok = 1;
      tarjan(x);
      if (!ok) continue;
      for (int y = 1; y <= n; ++y) {
        yes[y] = clow[y] >= dfn[y];
        if (y != x) G[idfn[low[y]]].push_back(y);
      }
      DFS(x);
      for (int i = 1; i <= n; ++i) G[i].clear();
      int cnt = 0;
      for (int i = 1; i <= n; ++i) cnt += yes[i];
      if (cnt * 5 >= n) {
        for (int i = 1; i <= n; ++i)
          if (yes[i]) printf("%d ", i);
        puts("");
      } else
        puts("-1");
      break;
    }
    if (T < 0) puts("-1");
    memset(fir + 1, 0, n << 2);
    id = 1;
  }
  return 0;
}
