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())
l=[]
n=0
temp=[]
res=[]
pos=0
pl=[]
maxi=0
for i in range(t):
	n=int(input())
	temp=list(map(int,input().split()))
	l.append(temp)
f=0
for i in range(t):
	maxi=max(l[i])
	pos=-1
	for j in range(len(l[i])):
		if(l[i][j]!=maxi):
			f=1
		elif(l[i][j]==maxi and f==1 ):
			pos=j+1
			break
		elif(l[i][j]==maxi and j!=len(l[i])-1 and l[i][j+1]!=maxi):
			pos=j+1
			break
	res.append(pos)
	maxi=0
	pos=0
	f=0
for i in res:
	print(i)



