#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int t{};
  cin >> t;
  while (t--) {
    long long int n{}, count1{};
    cin >> n;
    vector<long long int> a(2 * n, 0);
    vector<long long int> b{};
    for (long long int i = 0; i < 2 * n; i++) {
      cin >> a.at(i);
    }
    for (long long int i = 0; i < 2 * n; i++) {
      for (long long int j = i + 1; j < 2 * n; j++) {
        if (a.at(i) > 0 && a.at(j) > 0) {
          if ((a.at(i) + a.at(j)) % 2 == 0) {
            count1++;
            cout << i + 1 << " " << j + 1 << endl;
            a.at(i) = -1;
            a.at(j) = -1;
            break;
          }
        }
      }
      if (count1 == n - 1) break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
