#include <bits/stdc++.h>
using namespace std;
const long long N = 300300;
const long long INF = 1e18;
long long n, a[N], k, t, l, p, mx;
void solve() {
  cin >> n;
  k = 0;
  mx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (mx < a[i]) {
      mx = a[i];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (mx == a[i]) {
      k++;
    }
  }
  a[0] = INF;
  a[n + 1] = INF;
  if (k == n) {
    cout << -1 << "\n";
  } else {
    for (int i = 1; i <= n; i++) {
      if (a[i] == mx) {
        if (a[i] > a[i + 1]) {
          cout << i << "\n";
          goto wow;
        }
        if (a[i] > a[i - 1]) {
          cout << i << "\n";
          goto wow;
        }
      }
    }
  }
wow:;
}
int32_t main() {
  long long w = 1;
  cin >> w;
  while (w--) {
    solve();
  }
}
