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

case=int(input())
for i in range(case):
    x=int(input())
    y=[int(v) for v in input().split()]
    localmax=y[0]
    count=0
    for j in range(1,len(y)):
        if y[j]==localmax:
            count+=1
        else:
            localmax=max(y[j],localmax)
    if count==x-1:
        print(-1)
    else:
        z=y.index(localmax)+1
        if z==1:
            for k in range(1,len(y)):
                if y[k]==y[k-1]:
                    z+=1
                else:
                    break
        print(z)