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
import string
import math
import sys
from fractions import Fraction
def array_int():
    return [int(i) for i in sys.stdin.readline().split()]
def vary(arrber_of_variables):
    if arrber_of_variables==1:
        return int(sys.stdin.readline())
    if arrber_of_variables>=2:
        return map(int,sys.stdin.readline().split()) 
def makedict(var):
    return dict(Counter(var))
# i am noob wanted to be better and trying hard for that
def printDivisors(n): 
    divisors=[]  
    # Note that this loop runs till square root 
    i = 1
    while i <= math.sqrt(n): 
          
        if (n % i == 0) : 
              
            # If divisors are equal, print only one 
            if (n//i == i) : 
                divisors.append(i) 
            else : 
                # Otherwise print both 
                divisors.extend((i,n//i)) 
        i = i + 1
    return divisors

def countTotalBits(num):
     
     # convert number into it's binary and 
     # remove first two characters 0b.
     binary = bin(num)[2:]
     return(len(binary))
def isPrime(n) : 
  
    # Corner cases 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True
""" def dfs(node,val):
    global tree,visited
    visited[node]=1
    ans[node]=val
    val^=1
    for i in tree[node]:
        if visited[i]==-1:
            dfs(i,val) """
for _ in range(vary(1)):
    n=vary(1)
    num=array_int()
    if len(set(num))==1:
        print(-1)
    else:
        tt=num.index(max(num))
        # print(tt)
        if tt>0:
            print(tt+1)
            continue
        for i in range(n):
            if num[i]!=num[tt]:
                print(i)
                break










            




        
    
        
    
        
    

	



                






    
    

    
    


    

    



    


    














        

    

            
    





        
        
   
