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

n=int(input())
for _ in range(n):
    m=int(input())
    a=[int(i) for i in input().split()]
    d=max(a)
    ans='NO'
    index=0
    for i in range(0,len(a)):
        if(a[i]==d and i==0):
            if(a[i+1]<a[i]):
                index=i+1
                ans='YES'
                break
        elif(a[i]==d and i==(len(a)-1)):
            if(a[i]>a[i-1]):
                index=i+1
                ans='YES'
                break
        elif(a[i]==d):
            if(a[i+1]<a[i] or a[i]>a[i-1]):
                index=i+1
                ans='YES'
                break
    if(ans=='NO'):
        print(-1)
    else:
        print(index)