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())
for t in range(t):
    n=int(input())
    l=list(map(int,input().split()))
    mi=l[0]
    ma=l[0]
    z=0
    for i in range(n):
        if l[i]>ma:
            ma=l[i]
            z=i
        if l[i]<mi:
            mi=l[i]
    if mi==ma:
        print(-1)
    else:
        for i in range(n):
            if i==0:
                if(l[i]==ma):
                    if l[i+1]<l[i]:
                        z=i
                        break
            elif i==n-1:
                if(l[i]==ma):
                    if l[i-1]<l[i]:
                        z=i
                        break
            else:
                if(l[i]==ma) and (l[i-1]<l[i] or l[i+1]<l[i]):
                        z=i
                        break
        print(z+1)
            
