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 solve(lst):
	ans = 0
	mx = 0
	mxIndex = -1
	for x in lst:
		mx = max(mx,x)
	for i in range(0,len(lst)-1):
		if lst[i] == mx and lst[i] > lst[i+1]:
			mxIndex = i+1
		elif lst[i+1] == mx and lst[i] < lst[i+1]:
			mxIndex = i+2
	return mxIndex
	

t = int(input())
for x in range(t):
	p = int(input())
	lst = list(map(int,input().split(' ')))
	print(solve(lst))