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

# Author : -pratyay- #
import sys
inp=sys.stdin.buffer.readline
inar=lambda: list(map(int,inp().split()))
inin=lambda: int(inp())
inst=lambda: inp().decode().strip()
wrt=sys.stdout.write
pr=lambda *args,end='\n': wrt(' '.join([str(x) for x in args])+end)
enum=enumerate; inf=float('inf')
cdiv=lambda x,y: (-(-x//y))
# Am I debugging ? Check if I'm using same variable name in two places
# fun() returning empty list ? check new=temp[:] or new=temp
mod=1000000007

_T_=inin()
for _t_ in range(_T_):
    n=inin()
    a=inar()
    mx=max(a)
    a=[inf]+a+[inf]
    ans=-1
    for i in range(n+1):
        if a[i]==mx and (a[i-1]<mx or a[i+1]<mx):
            ans=i 
            break 
    print(ans)