#include <bits/stdc++.h>
using namespace std;
int main() {
  int tst;
  cin >> tst;
  while (tst--) {
    int n, arr[300008], ma = 0;
    vector<int> vec;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> arr[i];
      ma = max(ma, arr[i]);
    }
    for (int i = 1; i <= n; i++) {
      if (arr[i] == ma) vec.push_back(i);
    }
    if (vec.size() == 1)
      cout << vec[0] << endl;
    else if (vec.size() == n)
      cout << "-1" << endl;
    else {
      if (vec[0] == 1) {
        for (int i = 1; i <= n; i++) {
          if (arr[i] != ma) {
            cout << i - 1 << endl;
            break;
          }
        }
      } else
        cout << vec[0] << endl;
    }
  }
  return 0;
}
