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

def Solve():
	n=ri()
	a=rl()
	if max(a)==min(a):
		print(-1)
	else:
		mm=max(a)
		a=[2*mm]+a+[2*mm]
		for i in range(1,n+1):
			if a[i]==mm and (a[i-1]<a[i] or a[i+1]<a[i]):
				print(i)
				break



import sys
inp=sys.stdin.buffer.readline
rl=lambda: list(map(int,inp().split()))
ri=lambda: int(inp())
rs=lambda: inp().decode().strip()
Testcase=1
Testcase=ri()
for Test in range(Testcase):
	Solve()