#include <bits/stdc++.h>
const int N = 1e5 + 10, M = 2e5 + 10;
inline int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x;
}
int fir[N], nex[M], got[M], p[N];
int vis[N], dep[N], pre[N], ban[N], a[N], flg;
inline void dfs(int u) {
  vis[u] = 1;
  for (int i = fir[u]; i; i = nex[i]) {
    if (vis[got[i]] == 2) flg = false;
    if (!vis[got[i]]) dfs(got[i]);
  }
  vis[u] = 2;
}
inline int check(int u, int n) {
  for (int i = 1; i <= n; ++i) vis[i] = 0;
  return flg = true, dfs(u), flg;
}
inline void dfs(int u, int fa) {
  vis[u] = 1, pre[u] = u, dep[u] = dep[fa] + 1;
  for (int i = fir[u]; i; i = nex[i])
    if (!vis[got[i]]) {
      dfs(got[i], u), a[u] += a[got[i]];
      if (pre[got[i]] != got[i]) pre[u] = pre[got[i]];
    } else
      ++a[u], --a[got[i]], pre[u] = got[i];
  ban[u] = a[u] != 1;
}
inline void dfs(int u, std::vector<int> &vec) {
  ban[u] |= ban[pre[u]], vis[u] = 2;
  if (!ban[u]) vec.push_back(u);
  for (int i = fir[u]; i; i = nex[i])
    if (vis[got[i]] != 2) dfs(got[i], vec);
}
int main() {
  int T = read();
  for (int t = 1; t <= T; ++t) {
    int n = read(), m = read(), tot = 1, rot = 0;
    for (int i = 1; i <= m; ++i) {
      int u = read(), v = read();
      nex[++tot] = fir[u], fir[u] = tot, got[tot] = v;
    }
    for (int i = 1; i <= n; ++i) p[i] = i;
    std::random_shuffle(p + 1, p + n + 1);
    for (int i = 1; i <= std::min(n, 100); ++i)
      if (check(p[i], n)) {
        rot = p[i];
        break;
      }
    std::vector<int> vec;
    if (!rot) {
      puts("-1");
      goto clear;
    }
    for (int i = 1; i <= n; ++i) vis[i] = dep[i] = ban[i] = a[i] = 0;
    dfs(rot, 0), ban[rot] = 0, dfs(rot, vec);
    if (5 * vec.size() < n) {
      puts("-1");
      goto clear;
    }
    std::sort(vec.begin(), vec.end());
    for (auto dat : vec) printf("%d ", dat);
    puts("");
  clear:
    for (int i = 1; i <= n; ++i) fir[i] = vis[i] = 0;
    for (int i = 1; i <= tot; ++i) nex[i] = got[i] = 0;
  }
  return 0;
}
