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 sys
from collections import defaultdict as dd
from collections import Counter as cc
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = lambda: sys.stdin.buffer.readline().rstrip()


for _ in range(int(input())):
	q=int(input())
	w=list(map(int,input().split()))
	e=max(w)
	r=0
	t=0
	if len(set(w))==1:
		print(-1)
	else:
		if w[0]==e and w[1]<e:
			print(1)
		elif w[-1]==e and w[-2]<e:
			print(q)
		else:
			for i in range(1,q-1):
				if w[i]==e and (w[i]>w[i-1] or w[i]>w[i+1]):
					print(i+1)
					break