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

import sys
def solve(n,arr):
    max=-sys.maxsize
    min=sys.maxsize
    for i in range(len(arr)):
        if i!=0 and arr[i]==max and i==max_idx+1:
            continue
        if arr[i]>max:
            max=arr[i]
            max_idx=i
    for i in range(len(arr)):
        if arr[i]<min:
            min=arr[i]
            min_idx=i
    if max==min:
        return -1
    temp=max_idx
    flag=True
    while True:
        if flag:
            if max_idx<n-1 and arr[max_idx]==max:
                if arr[max_idx]>arr[max_idx+1]:
                    return max_idx+1
                max_idx+=1
                continue
        flag=False
        max_idx=temp
        if max_idx>0 and arr[max_idx]==max:
            if arr[max_idx]>arr[max_idx-1]:
                return max_idx+1
            max_idx-=1
            
                
            
    '''
    if arr[min_idx]<arr[min_idx+1] or arr[min_idx]<arr[min_idx-1]:
        if arr[min_idx+1]==max or arr[min_idx-1]==max:
            return max_idx+1
        else:
            if arr[min_idx+1]<arr[min_idx-1]:
                return min_idx+2
            else:
                return min_idx
                        
    '''   
        
        
    
for i in range(int(input())):
    n=int(input())
    arr=list(map(int,input().split()))
    print(solve(n,arr))
