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 mod = (long long)1e9 + 7;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    long long mx = *max_element(a, a + n);
    map<long long, long long> mp;
    for (int i = 0; i < n; i++) {
      mp[a[i]]++;
    }
    if (mp[mx] == n)
      cout << "-1";
    else {
      long long ans = 0;
      for (int i = 0; i < n; i++) {
        if (a[i] == mx) {
          if (i - 1 >= 0) {
            if (a[i - 1] < a[i]) {
              ans = i;
              break;
            }
          }
          if (i + 1 < n) {
            if (a[i + 1] < a[i]) {
              ans = i;
              break;
            }
          }
        }
      }
      cout << ans + 1;
    }
    cout << "\n";
  }
  return 0;
}
