#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, j = 0, f = 0;
    cin >> n;
    long long a[2 * n];
    for (long long i = 0; i < 2 * n; i++) {
      cin >> a[i];
    }
    pair<long long, long long> b[n - 1];
    for (long long i = 0; i < 2 * n; i++) {
      if (a[i] % 2 == 0 && f == 0) {
        f++;
        b[j].first = i + 1;
      } else if (a[i] % 2 == 0 && f != 0) {
        f = 0;
        b[j].second = i + 1;
        j++;
      }
    }
    f = 0;
    for (long long i = 0; i < 2 * n; i++) {
      if (a[i] % 2 != 0 && f == 0) {
        f++;
        b[j].first = i + 1;
      } else if (a[i] % 2 != 0 && f != 0) {
        f = 0;
        b[j].second = i + 1;
        j++;
      }
    }
    for (auto i : b) {
      cout << i.first << " " << i.second << endl;
    }
  }
}
