#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[2 * n + 2];
    for (long long int i = 0; i < 2 * n; i++) {
      cin >> a[i];
    }
    vector<pair<long long int, long long int> > v;
    for (long long int i = 0; i < 2 * n; i++) {
      if (a[i] == -1) continue;
      if (a[i] % 2 == 1) {
        bool done = false;
        for (long long int j = 0; j < 2 * n; j++) {
          if (i == j or a[j] == -1) continue;
          if (a[j] % 2 == 1) {
            v.push_back(make_pair(i + 1, j + 1));
            a[i] = -1;
            a[j] = -1;
            done = true;
            break;
          }
        }
        if (!done) break;
      }
    }
    for (long long int i = 0; i < 2 * n; i++) {
      if (a[i] == -1) continue;
      if (a[i] % 2 == 0) {
        bool done = false;
        for (long long int j = 0; j < 2 * n; j++) {
          if (i == j or a[j] == -1) continue;
          if (a[j] % 2 == 0) {
            v.push_back(make_pair(i + 1, j + 1));
            a[i] = -1;
            a[j] = -1;
            done = true;
            break;
          }
        }
        if (!done) break;
      }
    }
    for (long long int i = 0; i < n - 1; i++) {
      cout << v[i].first << " " << v[i].second << endl;
    }
  }
}
