#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 9;
const long long N = 500500;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long T;
  cin >> T;
  while (T--) {
    long long n, ans = 0, mx;
    cin >> n;
    for (long long b = 0; b <= 6; b++) {
      vector<long long> x, y;
      for (long long i = 1; i <= n; i++) {
        if (i & (1 << b)) {
          x.push_back(i);
        } else
          y.push_back(i);
      }
      if (x.size() == 0 || y.size() == 0) continue;
      cout << x.size() << " " << y.size() << " ";
      for (auto z : x) cout << z << " ";
      for (auto z : y) cout << z << " ";
      cout << endl;
      cin >> mx;
      ans = max(ans, mx);
    }
    cout << "-1 " << ans << endl;
    cout.flush();
  }
  return 0;
}
