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