#include <bits/stdc++.h>
using namespace std;
int t, n, m, flag;
vector<int> e[100005];
int vis[100005], anc[100005], c[100005], low[100005];
void dfs(int u, int fa) {
  if (flag == 1) return;
  low[u] = u;
  anc[u] = vis[u] = 1;
  for (int i = 0; i < e[u].size(); i++) {
    int v = e[u][i];
    if (vis[v]) {
      if (!anc[v]) flag = 1;
      c[u]++, c[v]--;
      low[u] = v;
      continue;
    }
    dfs(v, u);
    c[u] += c[v];
  }
  anc[u] = 0;
}
int ttt;
int main() {
  ios::sync_with_stdio(0);
  cin >> t;
  for (int tt = 1; tt <= t; tt++) {
    if (ttt >= 551) {
      cout << tt << endl;
      exit(0);
    }
    cin >> n >> m;
    for (int i = 1; i <= n; i++) e[i].clear();
    for (int i = 1, u, v; i <= m; i++) {
      cin >> u >> v;
      e[u].push_back(v);
    }
    for (int i = 1; i <= 100; i++) {
      int p = rand() % n + 1;
      flag = 0;
      for (int j = 1; j <= n; j++) vis[j] = anc[j] = c[j] = low[j] = 0;
      dfs(p, 0);
      if (flag == 0) {
        int cnt = 0;
        for (int j = 1; j <= n; j++)
          if (c[low[j]] < 2 && c[j] < 2) cnt++;
        if (cnt * 5 < n) {
          ttt++;
          break;
        }
        for (int j = 1; j <= n; j++) {
          if (c[j] >= 2 || c[low[j]] >= 2) continue;
          cout << j << ' ';
          ttt++;
        }
        cout << '\n';
        break;
      }
      if (i == 100) {
        cout << -1 << '\n';
        ttt++;
      }
    }
  }
}
