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


from sys import stdout,stdin
from collections import defaultdict,deque
import math
t=int(stdin.readline())
for _ in range(t):
    n=int(stdin.readline())
    #n,m=map(int,stdin.readline().split())
    l=list(map(int,stdin.readline().split()))
    flag=True
    for i in range(1,n):
        if l[i]!=l[0]:
            flag=False
            break
    if flag:
        print(-1)
    else:
        m=max(l)
        if l[0]==m and l[1]<m:
            print(1)
        elif l[n-1]==m and l[n-2]<m:
            print(n)
        else:
            for i in range(1,n-1):
                if l[i]==m:
                    if l[i-1]<m or l[i+1]<m:
                        print(i+1)
                        break
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    


    