1
3
5 3 4
 6
5
5 3 4 4 5
3
1 1 1
5
4 4 3 4 4
5
5 5 4 3 2
3
1 1 2
5
5 4 3 5 5
 1
3
10 1 5

1
 1
-1
2
2
3
1
 1

#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();
  }
}
