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())
def ans(a):
    m=max(a)

    for i in range(len(a)):
        if i>0 and i<len(a)-1:
            if a[i]==m:
                if a[i-1]<m or a[i+1]<m:
                    return i+1
        elif i==0:
            if a[i]==m and a[i+1]<m:
                return i+1
        else:
            if a[i]==m and a[i-1]<m:
                return i+1
    return -1
    
for z in range(T):
    n=int(input())
    a=[int(x) for x in input().split()]
    print(ans(a))
    
    
