#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
template <class T>
inline void cmin(T &a, T b) {
  ((a > b) && (a = b));
}
template <class T>
inline void cmax(T &a, T b) {
  ((a < b) && (a = b));
}
char IO;
template <class T = int>
T rd() {
  T s = 0;
  int f = 0;
  while (!isdigit(IO = getchar())) f |= IO == '-';
  do s = (s << 1) + (s << 3) + (IO ^ '0');
  while (isdigit(IO = getchar()));
  return f ? -s : s;
}
const int N = 2e5 + 10, INF = 1e9 + 10;
int n, m, k;
int low[N], t[N], fl, dfn, stk[N], top, ins[N];
int id[N], scc, sz[N], chk[N], C[N];
struct Edge {
  int to, nxt;
} e[N << 1];
int head[N], ecnt;
void AddEdge(int u, int v) {
  e[++ecnt] = (Edge){v, head[u]};
  head[u] = ecnt;
}
int F[N], fa[N];
int Find(int x) { return F[x] == x ? x : F[x] = Find(F[x]); }
void dfs(int u) {
  t[u] = low[u] = ++dfn, ins[stk[++top] = u] = 1;
  F[u] = u;
  chk[u] = 1;
  for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to) {
    if (!t[v]) {
      fa[v] = u, dfs(v), cmin(low[u], low[v]);
      F[v] = u;
    } else {
      if (Find(v) != v) chk[u] = 0;
      if (ins[v]) cmin(low[u], t[v]);
    }
  }
  if (low[u] == t[u]) {
    sz[++scc] = 0, C[scc] = 1;
    for (int v = -1; v != u;) {
      ins[v = stk[top--]] = 0;
      id[v] = scc, sz[scc]++, C[scc] &= chk[v];
    }
  }
}
int ind[N];
int s[N], w[N];
void dfs2(int u) {
  s[u] = 0, F[u] = u;
  for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
    if (id[v] == id[u]) {
      if (fa[v] == u)
        dfs2(v), s[u] += s[v], F[v] = u;
      else if (Find(v) == v) {
        s[u]++, s[v]--;
      }
    }
}
void dfs3(int u) {
  s[u] = s[u] > 1;
  for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
    if (id[v] == id[u])
      if (fa[v] != u) s[u] |= s[v];
  for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
    if (id[v] == id[u] && fa[v] == u) dfs3(v), w[u] += w[v];
}
int P[N], PC;
int vis[N];
void dfs4(int u) {
  if (!fl) return;
  F[u] = u, vis[u] = 1;
  for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
    if (id[u] == id[v]) {
      if (!vis[v])
        fa[v] = u, dfs4(v), F[v] = u;
      else if (Find(v) != v)
        w[Find(v)]++;
    }
}
int main() {
  for (int _ = 1, _end = rd(); _ <= _end; ++_) {
    n = rd(), m = rd(), k = ceil(n * 0.2);
    for (int i = 1, iend = n; i <= iend; ++i) head[i] = t[i] = ind[i] = 0;
    ecnt = 0;
    for (int i = 1, iend = m; i <= iend; ++i) {
      int u = rd(), v = rd();
      AddEdge(u, v);
    }
    dfn = scc = 0;
    for (int i = 1, iend = n; i <= iend; ++i)
      if (!t[i]) dfs(i);
    for (int u = 1, uend = n; u <= uend; ++u)
      for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
        if (id[u] != id[v]) ind[id[v]]++;
    int rt = -1;
    for (int i = 1, iend = scc; i <= iend; ++i)
      if (!ind[i]) {
        for (int j = 1, jend = n; j <= jend; ++j)
          if (id[j] == i) {
            rt = j;
            break;
          }
        break;
      }
    dfn = scc = 0;
    for (int i = 1, iend = n; i <= iend; ++i) t[i] = 0;
    fa[rt] = 0, dfs(rt);
    int cnt = 0;
    for (int u = 1, uend = n; u <= uend; ++u)
      for (int i = head[u], v = e[i].to; i; i = e[i].nxt, v = e[i].to)
        if (id[u] != id[v]) cnt++;
    fl = dfn == n && scc - 1 == cnt;
    for (int i = 1, iend = n; i <= iend; ++i)
      if (id[i] != id[rt]) fl &= chk[i];
    if (!fl || sz[id[rt]] < k) {
      puts("-1");
      continue;
    }
    for (int i = 1, iend = n; i <= iend; ++i)
      if (id[i] == id[rt]) P[++PC] = i;
    for (int i = 1, iend = PC; i <= iend; ++i) chk[P[i]] = 1;
    for (int d = 1, dend = n <= 100 ? 10 : 70; d <= dend; ++d) {
      for (int j = 1, jend = PC; j <= jend; ++j)
        vis[P[j]] = s[P[j]] = w[P[j]] = 0;
      int u = P[rand() % PC + 1];
      if (!chk[u]) continue;
      fl = 1, fa[u] = 0, dfs4(u);
      dfs2(u), dfs3(u);
      for (int j = 1, jend = PC; j <= jend; ++j) chk[P[j]] &= !w[P[j]];
    }
    cnt = 0;
    for (int i = 1, iend = n; i <= iend; ++i)
      if (id[i] == id[rt] && chk[i]) cnt++;
    if (cnt < k)
      puts("-1");
    else {
      for (int i = 1, iend = n; i <= iend; ++i)
        if (id[i] == id[rt] && chk[i]) printf("%d ", i);
      puts("");
    }
  }
}
