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




tests=int(input())

for _ in range(tests):
    n=int(input())
    arr=list(map(int,input().strip().split()))


    if arr.count(arr[0])==n:
    	print(-1)
    
    else:
    	flag=False
    	maxvalue=max(arr)

    	if arr[0]==maxvalue:
    		if arr[1]<maxvalue:
    			print(1)
    			flag=True

    	elif arr[n-1]==maxvalue:
    		if arr[n-2]<maxvalue:
    			print(n)
    			flag=True

    	if not flag:
       		for i in range(1,n-1):
       			if arr[i]==maxvalue:
       				if arr[i-1]<maxvalue or arr[i+1]<maxvalue:
       					print(i+1)
       					break
    				

    			








        
        
        
