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 fun(n):
    z=set(n)
    if len(z)==1 and len(n)!=1:
        return(-1)
    if len(n)==1:
        return 1
    a=0
    while n[a]==n[a+1]:
        a+=1
    z=a
    for i in range(z,len(n)):
        if n[i]>n[z]:
            z=i
    return z+1

y122=int(input())
for _ in range(y122):
    z=int(input())
    n=list(map(int,input().strip().split()))
    print(fun(n))
