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

t=int(input())
for i in range(t):
    n=int(input())
    array=list(map(int,input().split()))
    max_index=0
    max=array[0]
    for j in range(n):
       if array[j]>=max:
           max=array[j]
           max_index=j
    if max_index!=n-1:
        print(max_index+1)
    else:
        x=True
        for j in range(max_index,0,-1):
            if array[j-1]<array[j]:
                print(j+1)
                x=False
                break
        if x:
            print(-1)

