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 defaultdict as dd, deque as dq,Counter as c
from math import factorial as f ,ceil,gcd,sqrt
for _ in range(int(input())):
	a = int(input())
	b = list(map(int,input().split()))
	t = max(b)
	if [t]*a==b:
		print(-1)
	else:
		ans =None
		for i in range(1,len(b)):
			if b[i]==t and (b[i]>b[i-1] or b[i]>b[i+1]):
				ans = i+1
				break
		if ans!=None:
			print(ans)
		else:
			if b[0]==t and b[0]>b[1]:
				print(1)
			elif b[-1]==t and b[-1]>b[-2]:
				print(a)
			else:
				print(-1)