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

from collections import Counter as cn
import sys
def mod(): return 10**9+7

t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	x = max(arr)
	y = arr.count(x)
	if y == n:
		print(-1)
		continue
	if y == 1:
		print(arr.index(x) + 1)
		continue
	arr.append(0)
	arr.insert(0,0)
	for i in range(1, n + 1):
		if i == 1 and arr[1] == x and arr[2] != x:
			print(1)
			break
		elif i == n and arr[i] == x and arr[i - 1] != x:
			print(i)
			break
		elif i != 1 and i != n and arr[i] == x and (arr[i - 1] != x or arr[i + 1] != x):
			print(i)
			break