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 i in range(int(input())):
	a=input()
	b=list(map(int,input().split()))
	m=max(b)
	r=0
	for i in range(1,len(b)-1):
		if m==b[i]:
			if b[i-1]!=b[i] or b[i]!=b[i+1]:
				r=1
				p=i
				break
	if(r):
		print(p+1)
	elif(b[0]==m and b[0]!=b[1]):
		print(1)
	elif(b[len(b)-1]==m and b[-1]!=b[-2]):
		print(len(b))
	else:
		print(-1)	