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

from sys import stdin
t = int(stdin.readline())
for _ in xrange(t):
    n = int(stdin.readline())
    a =  map(int,stdin.readline().split()) 
    ans = -1
    ma = max(a)
    
    if a!=[ma]*n:
        a = [10**18] + a + [10**18]
        #print a
        for i in xrange(1,n+1):
            if a[i]==ma and (a[i-1]<ma or a[i+1]<ma):
                ans = i
                break
    print ans