#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector<int> g[N];
bool vis[N], in[N];
int dep[N];
bool dfs1(int x) {
  vis[x] = in[x] = 1;
  for (int i = 0; i < g[x].size(); i++) {
    int u = g[x][i];
    if (!vis[u]) {
      dep[u] = dep[x] + 1;
      if (!dfs1(u)) return 0;
    } else if (!in[u])
      return 0;
  }
  in[x] = 0;
  return 1;
}
int sz[N];
pair<int, int> mn[N];
void dfs2(int x) {
  for (int i = 0; i < g[x].size(); i++) {
    int u = g[x][i];
    if (dep[u] < dep[x]) {
      sz[x]++;
      sz[u]--;
      mn[x] = min(mn[x], pair<int, int>(dep[u], u));
    } else {
      dfs2(u);
      sz[x] += sz[u];
      mn[x] = min(mn[x], mn[u]);
    }
  }
}
bool f[N];
void dfs3(int x) {
  if (dep[x] > 1) f[x] = (sz[x] == 1 && f[mn[x].second]);
  for (int i = 0; i < g[x].size(); i++)
    if (dep[g[x][i]] > dep[x]) dfs3(g[x][i]);
}
int randint() {
  return ((long long)rand() * 9116111716LL + rand()) % 1000000007;
}
int ans[N];
int main() {
  srand(time(0));
  int T, n, m, rt;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) g[i].clear();
    for (int i = 1; i <= m; i++) {
      int x, y;
      scanf("%d%d", &x, &y);
      g[x].push_back(y);
    }
    for (int i = 1; i <= 50; i++) {
      int x = randint() % n + 1;
      for (int j = 1; j <= n; j++) vis[j] = in[j] = 0;
      dep[x] = 1;
      if (dfs1(x)) {
        rt = x;
        break;
      }
    }
    if (!rt) {
      puts("-1");
      continue;
    }
    for (int i = 1; i <= n; i++) {
      sz[i] = 0;
      mn[i] = pair<int, int>(0x3f3f3f3f, 0x3f3f3f3f);
    }
    dfs2(rt);
    for (int i = 1; i <= n; i++) f[i] = 0;
    f[rt] = 1;
    dfs3(rt);
    int Sz = 0;
    for (int i = 1; i <= n; i++)
      if (f[i]) ans[++Sz] = i;
    if (Sz * 5 < n) {
      puts("-1");
      continue;
    }
    for (int i = 1; i <= Sz; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
