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>
const int N = (int)2e5 + 5;
const int MOD = (int)1e9 + 7;
const bool MULTI_TEST = true;
const double PI = acos(-1.0);
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  int max = 0, index = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > max) {
      max = a[i];
    }
  }
  if (*min_element(a, a + n) == max)
    cout << "-1\n";
  else {
    for (int i = 0; i < n - 1; i++) {
      if (a[i] == max && a[i] > a[i + 1]) index = i + 1;
    }
    if (index != -1) {
      cout << index << '\n';
      return;
    } else {
      for (int i = 1; i < n; i++) {
        if (a[i] == max && a[i] > a[i - 1]) index = i + 1;
      }
    }
    cout << index << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  if (MULTI_TEST) cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
