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

import math
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(100000)
def put():  return  map(int, stdin.readline().split())
for _ in range(int(input())):
	n=int(input())
	l=list(put())
	if(len(l)==1):
		print(1)
	elif(len(set(l))==1):
		print(-1)
	else:
		elem=max(l)
		ans=-1
		for i in range(len(l)):
			if(l[i]==elem and (i+1)<n):
				if(l[i+1]<l[i]):
					ans=i
					break
			if(l[i]==elem and (i-1)>-1):
				if(l[i-1]<l[i]):
					ans=i
					break
		print(ans+1)

	
	

