#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 55;
int T, n, m, x, y;
vector<int> v[N];
bool vis[N], bj[N * 2];
int deep[N], siz[N], top[N], son[N], fu[N], faa[N];
void dfs(int u, int fa) {
  vis[u] = 1;
  deep[u] = deep[fa] + 1;
  siz[u] = 1;
  fu[u] = faa[u] = fa;
  for (unsigned int i = 0; i < v[u].size(); i++) {
    if (vis[v[u][i]]) continue;
    dfs(v[u][i], u);
    siz[u] += siz[v[u][i]];
    if (siz[v[u][i]] > siz[son[u]]) son[u] = v[u][i];
  }
}
void dfs1(int u, int fa) {
  top[u] = fa;
  if (son[u]) dfs1(son[u], fa);
  for (unsigned int i = 0; i < v[u].size(); i++) {
    if (top[v[u][i]]) continue;
    dfs1(v[u][i], v[u][i]);
  }
}
int lca(int x, int y) {
  while (top[x] != top[y]) {
    if (deep[top[x]] < deep[top[y]]) swap(x, y);
    x = fu[top[x]];
  }
  if (deep[x] < deep[y]) swap(x, y);
  return y;
}
bool check(int u) {
  for (int i = 1; i <= n; i++) vis[i] = 0, son[i] = 0;
  dfs(u, 0);
  dfs1(u, u);
  for (int i = 1; i <= n; i++) {
    for (int k = 0; k < v[i].size(); k++) {
      if (fu[v[i][k]] != i and lca(v[i][k], i) != v[i][k]) {
        return 0;
      }
    }
  }
  return 1;
}
vector<int> cd[N];
bool flag[N];
int st[N], head;
void calc(int u) {
  for (int i = 0; i < v[u].size(); i++) {
    if (fu[v[u][i]] == u) {
      calc(v[u][i]);
      for (int k = 0; k < cd[v[u][i]].size(); k++) {
        if (cd[v[u][i]][k] != u) {
          cd[u].push_back(cd[v[u][i]][k]);
        }
      }
    } else
      cd[u].push_back(v[u][i]);
  }
  if (cd[u].size() > 1) flag[u] = 0;
}
void dfss(int u) {
  if (cd[u].size() == 1) flag[u] &= flag[cd[u][0]];
  if (flag[u]) st[++head] = u;
  for (int i = 0; i < v[u].size(); i++) {
    if (fu[v[u][i]] == u) {
      dfss(v[u][i]);
    }
  }
}
void solve() {
  for (int i = 1; i <= n; i++) cd[i].clear(), flag[i] = 1;
  head = 0;
  for (int i = 1; i <= n; i++) {
    int x = (rand() << 15 | rand()) % n + 1;
    if (check(x)) {
      calc(x);
      dfss(x);
      if (head * 5 < n) {
        puts("-1");
        return;
      }
      sort(st + 1, st + head + 1);
      for (int k = 1; k <= head; k++) {
        printf("%d ", st[k]);
      }
      puts("");
      return;
    }
  }
  puts("-1");
  return;
}
int main() {
  cin >> T;
  int cn = 0;
  int gg = T;
  while (T--) {
    cn++;
    if (cn == 22) {
      cin >> n >> m;
      cout << n << " " << m << endl;
      for (int i = 1; i <= m; i++) {
        cin >> x >> y;
        cout << x << " " << y << endl;
      }
      return 0;
    }
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= m; i++) {
      scanf("%d%d", &x, &y);
      v[x].push_back(y);
    }
    if (gg <= 10) {
      solve();
      for (int i = 1; i <= n; i++) {
        v[i].clear();
      }
    }
  }
  return 0;
}
