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 collections import Counter,defaultdict
I =lambda:int(input())
M =lambda:map(int,input().split())
LI=lambda:list(map(int,input().split()))
for _ in range(I()):
    n=I()
    a=LI()
    b=max(a)
    if a.count(b)==n:
        print(-1)
    else:
        for i in range(0,n):
            if a[i]==b:
                if a[i-1]!=b and i!=0:
                    print(i+1)
                    break
                elif i+1!=n and a[i+1]!=b:
                    print(i+1)
                    break
        

            
            
                
        
        
            
    


            



        
            




    


      
      
    

  



