#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = 0;
    for (int i = 0; i < 9; i++) {
      vector<int> a, b;
      for (int j = 0; j < n; j++) {
        if ((j & (1 << i)))
          a.push_back(j + 1);
        else
          b.push_back(j + 1);
      }
      if (a.size() == 0 || b.size() == 0) continue;
      cout << a.size() << " " << b.size() << " ";
      for (int ae : a) cout << ae << " ";
      for (int be : b) cout << be << " ";
      cout << endl;
      int tans;
      cin >> tans;
      ans = max(ans, tans);
    }
    cout << -1 << " " << ans << endl;
  }
}
