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

#a='banana' 'nan' in a returns true
#can be used to check substring
#.lower() .upper()
#s.replace("man","woman")
#substr=s[start:end]
#x=list()
#x.append(1)

t=input()
t=int(t)
for tt in range(t):
	n=input()
	n=int(n)
	arr=list()
	k=input()
	arr=k.split()
	for i in range(n):
		arr[i]=int(arr[i])
	maxm=max(arr)
	ans=-1
	for i in range(n):
		if arr[i]==maxm:
			if i-1>=0:
				if arr[i-1]!=maxm:
					ans=i+1
			if i+1<n:
				if arr[i+1]!=maxm:
					ans=i+1
	print(ans)