#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    n = 2 * n;
    int ar[n + 10];
    int i, j, k, cnt = 0, mx = 0;
    for (i = 1; i <= n; i++) {
      cin >> ar[i];
      if (ar[i] % 2 == 0)
        cnt++;
      else
        mx++;
    }
    int e = 0, oo = 0;
    if (cnt >= (n - 2)) {
      for (i = 1; i <= n; i++) {
        if (ar[i] % 2 == 0) {
          cout << i;
          e++;
          if (e % 2 == 0)
            cout << endl;
          else
            cout << " ";
        }
        if (e == (n - 2)) break;
      }
    } else if (mx >= (n - 2)) {
      for (i = 1; i <= n; i++) {
        if (ar[i] % 2 == 1) {
          cout << i;
          e++;
          if (e % 2 == 0)
            cout << endl;
          else
            cout << " ";
        }
        if (e == (n - 2)) break;
      }
    } else {
      if (cnt % 2 == 1) cnt--;
      if (mx % 2 == 1) mx--;
      for (i = 1; i <= n; i++) {
        if (ar[i] % 2 == 1) {
          cout << i;
          e++;
          if (e % 2 == 0)
            cout << endl;
          else
            cout << " ";
        }
        if (e == mx) break;
      }
      k = e;
      e = 0;
      for (i = 1; i <= n; i++) {
        if (ar[i] % 2 == 0) {
          cout << i;
          e++;
          if (e % 2 == 0)
            cout << endl;
          else
            cout << " ";
        }
        if (e == cnt || (k + e) == n - 2) break;
      }
    }
  }
  return 0;
}
