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

for _ in range(int(input())):
    n=int(input())
    data=[int(x) for  x in input().split()]
    if(len(set(data))==1):
        print(-1)
    else:
        temp=max(data)
        ans=0
        for q in range(n):
            #print(q)
            if(data[q]==temp):
                if(q==0):
                    if(data[1]<temp):
                        pos=1
                        break
                elif(q==(n-1)):
                    if(data[-2]<temp):
                        pos=n
                        break
                else:
                    if(data[q-1]<temp or data[q+1]<temp):
                        pos=q+1
                        break
        print(pos)