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
LI=lambda:list(map(int, sys.stdin.readline().strip('\n').split()))
MI=lambda:map(int, sys.stdin.readline().strip('\n').split())
SI=lambda:sys.stdin.readline().strip('\n')
II=lambda:int(sys.stdin.readline().strip('\n'))

for _ in range(II()):
	n=II()
	a=LI()
	tmp=set(a)
	ans=-1
	if len(tmp)>1:
		m=-1
		for i, v in enumerate(a):
			if v>m and ((i and v>a[i-1]) or (i<n-1 and v>a[i+1])):
				m=v
				ans=i+1
	print(ans)