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

def f(L):
	b=max(L)
	n=len(L)
	count=0
	i=0
	while(i<n):
		if(i==0):
			if(L[i]==b and L[i+1]<b):
				return 1
			else:
				i+=1
		elif(i==n-1):
			if(L[i]==b and L[i-1]<b):
				return n
			else:
				return -1
		else:
			if(L[i]==b):
				if(L[i-1]<b or L[i+1]<b):
					return i+1
				else:
					i+=1
			else:
				i+=1
	return -1

t=int(input())
for i in range(0,t):
	n=int(input())
	L=list(map(int,input().split()))
	print(f(L))

		