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;
void solve() {
  int i, j, n, m;
  int max = 0, pmax = 0, f = 0, f2 = 0;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= max) {
      max = a[i];
      pmax = i;
    }
    if (a[0] != a[i]) {
      f = 1;
    }
  }
  i = pmax;
  while (i >= 0) {
    if (a[i] != max) {
      f2 = 1;
      break;
    }
    i--;
  }
  if (f == 0)
    cout << -1 << endl;
  else if (pmax != (n - 1)) {
    cout << pmax + 1 << endl;
  } else if (f2 == 1)
    cout << i + 2 << endl;
  else {
    cout << -1 << endl;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  cin >> t;
  while (t-- > 0) {
    solve();
  }
  return 0;
}
