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 i in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    maxi=max(a)
    s=0
    for i in range(len(a)):
        if(a[i]<maxi):
            s=1
            break
    if(s==1):
        f=0
        for j in range(1,len(a)-1):
            if(a[j]==maxi and a[j+1]<maxi):
                print(j+1)
                f=1
                break
            if(a[j]==maxi and a[j]>a[j-1]):
                print(j+1)
                f=1
                break
        if(f==0):
            if(a[n-1]>a[n-2]):
                print(n)
            elif(a[0]>a[1]):
                print(1)
            
    else:
        print(-1)