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

t = int(input())
for i in range(t):
	n = int(input())
	max1 = 0
	index_max =0
	a = list(map(int,input().split()))
	for j in range(n):
		if a[j]>max1:
			max1=a[j]
			index_max=j+1
	a.sort()
	any=False
	ukazatel = n-1
	while ukazatel!=0:
		if a[ukazatel]!=a[ukazatel-1]:
			any=True
			break
		ukazatel-=1
	if any:
		print(index_max)
	else:
		print(-1)