#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
T abs(T x) {
  return x < 0 ? -x : x;
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
bool chmin(T& x, const T& y) {
  if (x > y) {
    x = y;
    return true;
  }
  return false;
}
template <typename T>
bool chmax(T& x, const T& y) {
  if (x < y) {
    x = y;
    return true;
  }
  return false;
}
vector<vector<int>> e;
vector<int> c;
vector<int> deep;
vector<int> a;
set<int> ans;
vector<vector<int>> f;
bool dfs(int x, int d) {
  a.push_back(x);
  c[x] = 1;
  deep[x] = d;
  for (int y : e[x]) {
    if (c[y]) {
      if (c[y] == 1) {
        f[x].push_back(y);
        continue;
      } else {
        return false;
      }
    }
    if (!dfs(y, d + 1)) {
      return false;
    }
    f[x].insert(f[x].end(), f[y].begin(), f[y].end());
  }
  sort((f[x]).begin(), (f[x]).end(),
       [&](const int u, const int v) { return deep[u] < deep[v]; });
  f[x].resize(min(2, (int)f[x].size()));
  while (f[x].size() && deep[*f[x].rbegin()] >= deep[x]) {
    f[x].pop_back();
  }
  c[x] = 2;
  return true;
}
int main(int, char**) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  int idx = 0;
  while (t--) {
    int n, m;
    cin >> n >> m;
    e = vector<vector<int>>(n);
    for (int i = 0; i < m; ++i) {
      int u, v;
      cin >> u >> v;
      --u;
      --v;
      e[u].push_back(v);
    }
    bool ok = false;
    ans.clear();
    deep = vector<int>(n, 0);
    for (int iter = 0; iter < 100; ++iter) {
      int root = rand() % n;
      c = vector<int>(n, 0);
      f = vector<vector<int>>(n);
      a.clear();
      if (!dfs(root, 0)) {
        continue;
      }
      if ((int)a.size() != n) {
        continue;
      }
      set<int> res;
      a.erase(a.begin());
      res.insert(root);
      for (auto& x : a) {
        if (f[x].size() != 1) {
          continue;
        }
        if (!res.count(f[x][0])) {
          continue;
        }
        res.insert(x);
      }
      if (ans.size()) {
        if (res != ans) {
          ;
          ;
          ;
          ;
          exit(0);
        }
      } else {
        ans = res;
      }
      ok = true;
      break;
    }
    ok &= (int)ans.size() * 5 > n;
    if (!ok) {
      idx += 1;
      cout << -1 << endl;
    } else {
      bool first = true;
      for (auto& x : ans) {
        idx += 1;
        if (!first) {
          cout << " ";
        }
        first = false;
        cout << x + 1;
      }
      cout << endl;
    }
    if (29 <= idx) {
      break;
    }
  }
  cerr << "Time execute: " << clock() / (double)CLOCKS_PER_SEC << " sec"
       << endl;
  return 0;
}
