#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = 0;
    for (int h = 0; h < 7; h++) {
      int k0 = 0, k1 = 0;
      for (int i = 1; i <= n; i++) (!(i & 1 << h) ? k0 : k1)++;
      if (k0 == 0 || k1 == 0) continue;
      cout << k0 << ' ' << k1;
      for (int i = 1; i <= n; i++)
        if (!(i & 1 << h)) cout << ' ' << i;
      for (int i = 1; i <= n; i++)
        if (i & 1 << h) cout << ' ' << i;
      cout << endl;
      int d;
      cin >> d;
      ans = max(ans, d);
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
