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())
	aquarium = list(map(int,input().split()))

	t1 = max(aquarium)
	flag = 0
	for j in range(n):

		if j == 0:

			if t1 == aquarium[j] and n > 1 and aquarium[j] > aquarium[j+1]:

				print(j+1)
				flag = 1
				break

		elif j == n-1:

			if t1 == aquarium[j] and n >  1 and aquarium[j] > aquarium[j-1]:

				print(j+1)
				flag = 1
				break

		elif aquarium[j] == t1:
			if aquarium[j] > aquarium[j-1]:
				print(j+1)
				flag = 1
				break
			elif aquarium[j] > aquarium[j+1]:
				print(j+1)
				flag = 1
				break

	if flag == 0:
		print(-1)