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

def solve(n,l):
    m=l[0]
    a=-1
    for i in range(1,n-1):
        if l[i]>=m and (l[i]>l[i+1] or l[i]>l[i-1]):
            m=l[i]
            a=i+1
    if l[n-1]>m and l[n-1]>l[n-2]:
        return n
    if m==l[0] and l[1]!=m:
        return 1
    return a



for _ in range(int(input())):
    n=int(input())
    l=list(map(int,input().split()))
    print(solve(n,l))



