#include <bits/stdc++.h>
using namespace std;
int nth_bit(int64_t num, int n) { return (num >> n) & 1; }
void solve() {
  int N;
  cin >> N;
  int ans = 0;
  for (int k = 0; k < 9; k++) {
    vector<int> v[2];
    for (int i = 1; i <= N; i++) v[nth_bit(i, k)].push_back(i);
    if (v[1].size() == 0) {
      break;
    } else {
      cout << v[0].size() << " " << v[1].size();
      for (int i = 0; i < 2; i++)
        for (int a : v[i]) cout << " " << a;
      cout << endl;
      int res;
      cin >> res;
      if (res == -1) exit(0);
      ans = max(ans, res);
    }
  }
  cout << "-1 " << ans << endl;
}
int main() {
  int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
