#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  set<int> unq;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    unq.insert(a[i]);
  }
  if (unq.size() == 1)
    cout << -1;
  else {
    for (int i = 0; i < n; i++) {
      if (a[i] == *unq.rbegin()) {
        if (i == 0) {
          if (a[1] != a[0]) {
            cout << 1;
            return;
          }
        } else if (i == n - 1) {
          if (a[i] != a[i - 1]) {
            cout << i + 1;
            return;
          }
        } else {
          if (a[i] != a[i - 1] || a[i] != a[i + 1]) {
            cout << i + 1;
            return;
          }
        }
      }
    }
  }
}
