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