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

def Maxfish(a,max):
    found=False
    for i in range (0,len(a)):
        if a[i]==max:
            a[i]=1
        else:
            a[i]=0

    for i in range (0,len(a)):
        if i==0 and a[i]==1 and i+1 <len(a)-1:
            if a[i+1]==0:
                if found==False:
                 return i+1
                 found=True

        elif i==len(a)-1 and a[i]==1:
            if a[i-1]==0:
                if found==False:
                 return i+1
                 found=True

        else:
            if a[i]==1:
                if a[i+1]==0 or a[i-1]==0:
                   if found==False:
                    return i+1
                    found=True


        if found==True :
           break
    return -1

list=[]
n=int(input())
while (n>0):

 size=int(input())
 a=input().split()
 for i in range (0,len(a)):
     a[i]=int(a[i])
 list.append(a)
 a=[]
 n=n-1


for i in range(0,len(list)):
    print(Maxfish(list[i],max(list[i])))





