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 math import *
import threading
import sys


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)


def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1

	while (start <= end):
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer  # index where x is not less than num


def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1

	while (start <= end):
		middle = (end + start) // 2

		if li[middle] <= num:
			answer = middle
			start = middle + 1

		else:
			end = middle - 1
	return answer  # index where x is not greater than num


def abs(x):
	return x if x >= 0 else -x


def binary_search(li, val, lb, ub):
	ans = -1
	while (lb <= ub):
		mid = (lb + ub) // 2
		# print(mid, li[mid])
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:	
			lb = mid + 1
		else:
			ans = mid # return index
			break
	return ans


def kadane(x):  # maximum sum contiguous subarray
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far


def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum


def graph(n, m):
	adj = dict()
	for i in range(1, n + 1):
		adj.setdefault(i, 0)
	for i in range(m):
		a, b = map(int, input().split())
		adj[a] += 1
		adj[b] += 1
	return adj


def SieveOfEratosthenes(n):
	prime = [True for i in range(n+1)]
	p = 2
	li = []
	while (p * p <= n):
		if (prime[p] == True):
			for i in range(p * p, n+1, p):
				prime[i] = False
		p += 1

	for p in range(2, len(prime)):
		if prime[p]:
			li.append(p)
	return li


# _______________________________________________________________#


INF = 1e9
# sys.setrecursionlimit(900000)
# threading.stack_size(10**5)  # remember it cause mle
# def main():
primes = SieveOfEratosthenes(1300000)
def fn(n):
	i = 2
	res = n-1
	val = 0
	for i in range(int(sqrt(n))+1,1,-1):
	
		val = i - 1 + int(ceil((n-i)/i))
		#print(val,res)
		if val <= res:
			#print(i)
			res = val
		else:
			break
		
	return res


def solve(a,b,c): 
	dis = (b**2) - (4 * a*c) 

	# find two results 
	ans1 = (-b-sqrt(dis))/(2 * a) 
	#ans2 = (-b + cmath.sqrt(dis))/(2 * a) 

	# printing the results 
	#print('The roots are') 
	print(int(ans1)) 
	#print(ans2) 	
	return
	

for _ in range(int(input())):
#for _ in range(1):
	n = int(input())
	#n,m = map(int, input().split())
	# s = list(input())
	# a = [int(x) for x in s]
	# s = list(input())
	a = list(map(int, input().split()))
	#b = list(map(int,input().split()))
	#c = list(map(int,input().split()))
	# adj = graph(n,m)
	maxcount = a.count(max(a))
	if maxcount == n:
		print(-1)
	else:
		ans = -1
		maxelem = max(a)
		for i in range(1, n-1):
			if a[i] == maxelem:
				if a[i-1] < a[i] or a[i+1] < a[i]:
					ans = i
					break
		if ans == -1:
			if a[0] == maxelem and a[0] > a[1]:
				ans = 0
			elif a[n-1] == maxelem and a[n-1] > a[n-2]:
				ans = n-1
		print(ans+1)
			





















'''		
t = threading.Thread(target=main)
t.start()
t.join()
'''
