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

#Coding is about expressing your feeling and there is always a better way to express your feeling_feelme
import sys
try:sys.stdin,sys.stdout=open('in.txt','r'),open('out.txt','w')
except:pass
ii1=lambda:int(sys.stdin.readline().strip()) # for interger
is1=lambda:sys.stdin.readline().strip() # for str
iia=lambda:list(map(int,sys.stdin.readline().strip().split())) # for List[int]
isa=lambda:sys.stdin.readline().strip().split() # for List[str]
mod=int(1e9 + 7);from collections import *;from math import *

###################### Start Here ######################

for _ in range(ii1()):
    n = ii1()
    arr = iia()
    arrr=sorted(arr)
    if arrr[0]==arrr[-1]:
        print(-1)
    else:
        a=max(arr)
        ans=0
        if arr[0]!=a and arr[1]==a:
            ans=2
        elif arr[-1]==a and arr[-2]!=a:
            ans=n
        else:
            for i in range(n-1):
                if arr[i]==a and arr[i+1]!=a:
                    ans = i+1
                    break
                if arr[i]!=a and arr[i+1]==a:
                    ans=i+2
                    break
        print(ans)
