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

from sys import stdin,stdout
for _ in range(int(input())):
    n=int(input())
    arr=list(map(int,input().split()))
    m=max(arr)
    x=-1
    if(arr.count(m)==n):
        print(x)
            
    else:
        for i in range(n):
            
            if(arr[i]==m and i==0 and arr[i+1]<arr[i]):
                x=i
                break
            elif(arr[i]==m and i==n-1 and arr[i-1]<arr[i]):
                x=i
                break
            else:
                if(arr[i]==m and arr[i+1]<arr[i] and i>0):
                    x=i
                    break
                elif(arr[i]==m and arr[i-1]<arr[i] and i>0):
                    x=i
                    break
        print(x+1)

            