#include <bits/stdc++.h>
inline int read() {
  char c;
  int x;
  for (c = getchar(); !isdigit(c); c = getchar())
    ;
  for (x = 0; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  return x;
}
const int inf = 1e9;
const int N = 1e6 + 5, L = 250;
int n, m, ord[N], dis[N], pre[N];
bool ok[N], used[N], ban[N];
std::vector<int> e[N], d[N];
void dfs1(int u) {
  used[u] = true;
  for (auto v : e[u]) {
    if (pre[v] == u || used[v]) {
      continue;
    }
    ban[v] = true;
  }
  for (auto v : d[u]) {
    dfs1(v);
  }
  used[u] = false;
}
void dfs2(int u, bool flag) {
  flag |= ban[u];
  if (flag) {
    ok[u] = false;
  }
  for (auto v : d[u]) {
    dfs2(v, flag);
  }
}
void solve(int rt) {
  for (int u = 1; u <= n; u++) {
    dis[u] = inf;
    d[u].clear();
    ban[u] = false;
  }
  dis[rt] = 0;
  std::queue<int> que;
  for (que.push(rt); !que.empty(); que.pop()) {
    int u = que.front();
    for (auto v : e[u]) {
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        pre[v] = u;
        d[u].push_back(v);
        que.push(v);
      }
    }
  }
  dfs1(rt);
  dfs2(rt, false);
}
int main() {
  for (int T = read(); T; T--) {
    n = read();
    m = read();
    for (int u = 1; u <= n; u++) {
      e[u].clear();
      ord[u] = u;
      ok[u] = true;
    }
    for (int i = 0; i < m; i++) {
      int u = read(), v = read();
      e[v].push_back(u);
    }
    std::random_shuffle(ord + 1, ord + n + 1);
    std::random_shuffle(ord + 1, ord + n + 1);
    std::random_shuffle(ord + 1, ord + n + 1);
    for (int i = 1; i <= L && i <= n; i++) {
      solve(ord[i]);
    }
    int cnt = 0;
    for (int u = 1; u <= n; u++) {
      if (ok[u]) {
        cnt++;
      }
    }
    if (cnt * 5 < n) {
      printf("-1\n");
    } else {
      for (int u = 1; u <= n; u++) {
        if (ok[u]) {
          printf("%d ", u);
        }
      }
      printf("\n");
    }
  }
  return 0;
}
