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,math,collections,itertools
from collections import defaultdict
from functools import reduce


#from itertools import permutations,combinations
    
def file():
    sys.stdin = open('input.py', 'r')
    sys.stdout = open('output.py', 'w') 
def get_array():
    l=list(map(int, input().split()))
    return l
def get_ints():   
    return map(int, input().split())
def sod(n):
    n,c=str(n),0
    for i in n: 
        c+=int(i)
    return c    
def isPrime(n):
    if (n <= 1):
        return False
    if (n <= 3):
        return True
    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 getFloor(A, x):

    (left, right) = (0, len(A) - 1)

    floor = -1
    while left <= right:
        mid = (left + right) // 2
        if A[mid] == x:
            return A[mid]
        elif x < A[mid]:
            right = mid - 1
        else:
            floor = A[mid]
            left = mid + 1
            
    return floor
def gcd(a,b):
    if (b == 0):
         return a
    return gcd(b, a%b)
def chk_power_of_2(n):
    return n&(n-1)==0
def factors(n):    
    return set(reduce(list.__add__,([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))    
#file()
def main():
    for tt in range(int(input())):
        n=int(input())
        l=get_array()
        if(len(list(set(l)))==1):
            print(-1)
        else:
            m=max(l)
            ans=l.index(m)
            if(ans==0):
                for i in range(n):
                    if(l[i]!=m):
                        ans=i-1
                        break
            #elif(ans==n-1)            
            print(ans+1)



            

            


    









    
            



    

                
        



    
    



        




                





        


    





        
            
        























    

    
    

        











        
        

        























































                

            







            
            
































        








if __name__ == '__main__':
    main()