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

import sys
t=int(input().strip())
for a0 in range(t):
    n=int(input())
    l1=[int(i) for i in input().split()]
    count=1
    l=l1.copy()
    l.sort()

    if(l[0]==l[len(l)-1]):
        print(-1)
    else:
        a=l[len(l)-1]
        
        if(l1[0]==a and l1[1]!=a):
            print(1)
        elif(l1[len(l1)-1]==a and l1[len(l1)-2]!=a):
            print(len(l1))
        else:
            for i in range(1,len(l1)-1):
                count+=1
                if(l1[i]==a and (l1[i-1]!=a or l1[i+1]!=a) ):
                    print(count)
                    break
        
    