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 ans(n,a):
	c=0
	for i in range(n-1):
		if a[i]!=a[i+1]:
			c=1
			break
	if c==0:
		return -1
	m=a[0]
	ind=[]
	for i in range(n):
		if a[i]>m:
			m=a[i]
			ind=[i]
		if a[i]==m:
			ind.append(i)
	for i in range(len(ind)):
		x=ind[i]
		if x==0:
			if a[x]>a[x+1]:
				return 1
		elif x==n-1:
			if a[x]>a[x-1]:
				return n
		else:
			if a[x]>a[x+1] or a[x]>a[x-1]:
				return x+1



	

def answer():
	n=int(input())
	a=[int(x) for x in input().split()]
	print(ans(n,a))

t=int(input())
for i in range(t):
	answer()