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

from collections import Counter, OrderedDict
from itertools import permutations as perm
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
import math
 
g   = lambda : stdin.readline().strip()
gl  = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1e9)+7
inf = float("inf")

t, = gil()
# t = 1

for _ in range(t):
	n, = gil()
	a = gil()
	maxm = max(a)
	ans = None
	for i in range(n):
		if a[i] == maxm : 
			if i and a[i] > a[i-1]:
				ans = i; break

			if i+1 < n and a[i] > a[i+1]:
				ans = i ; break
	if ans is not None :
		left, right = a[:ans], a[ans+1:]
		right.reverse()
		while left or right:
			if left and a[ans] > left[-1] :
				a[ans] += 1
				left.pop()
			elif right and a[ans] > right[-1]:
				a[ans] += 1
				right.pop()
			else:
				ans = None
				break
	print(ans+1 if ans is not None else -1 )
