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

for _ in range(int(input())):
	x =int(input())
	*li, = map(int,input().split())
	a = max(li)
	b =li.index(a)
	if li.count(a)== x:
		print(-1)
		continue
	elif li[0]==a and li[1]!= a:
		print(1)
		continue
	elif li[-1]==a and li[-2] != a:
		print(x)
		continue
	for i in range(1,x-1):
		if li[i]==a and ( li[i-1]!= a or li[i+1] != a):
			print(i+1)
			break

