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

#define	 ll     long long
#define  seti   set<int>
#define  setl   set<ll>
#define  veci   vector<int>
#define  vecl   vector<ll>
#define  pus(a) push_back(a)
#define  pop()  pop_back()
#define  Max(v,n)   *max_element(v,v+n)
#define  IOS    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#include<bits/stdc++.h>
using namespace std;
const int na = 1e5;
using namespace std;
int main(){
	IOS;
	int test=1;
	cin >> test;
	while(test--){
		int i,j,n,mx,l=-1;
		cin >> n;
		int a[n];
		for(i=0;i<n;i++)
			cin >> a[i];
		mx = Max(a,n);
		for(i=0;i<n;i++){
			if(i==0){
			    if(a[i]>a[i+1]){
			    	l = i+1;
			    	break;
				}
			}
			else if(i==n-1){
				if(a[n-1]>a[n-2]){
					l = n;
					break;
				}
			}
			else{
				if(a[i]>a[i+1]||a[i]>a[i-1]){
					l = i+1;
					break;
				}
			}
		}
		cout << l <<endl;
	}
}
