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())
w=[]
for i in range(t):
    n=int(input())
    a=list(map(int, input().split()))
    ma=max(a)
    mi=min(a)
    if ma==mi:
        w.append(-1)
    else:
        s=a.index(ma)
        if s==0:
            while s<n-1:
                if a[s]==a[s+1]:
                    s=s+1
                else:
                    break
        w.append(s+1)
for i in w:
    print(i)

