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;
int const N = 3e5 + 10;
int mx, n, t, a[N], indx;
void read_input() {
  cin >> n;
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = a[1];
  a[n + 1] = a[n];
  for (int i = 1; i <= n; i++) {
    if (a[i] >= mx) {
      if (!(a[i] == mx && (a[i - 1] == mx || a[i + 1] == mx))) {
        mx = a[i];
        indx = i;
      }
    }
  }
  sort(a, a + n);
  if (a[1] == a[n])
    cout << -1 << '\n';
  else
    cout << indx << '\n';
}
void solve() {}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> t;
  while (t--) {
    read_input();
  }
}
