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

'''
	AUTHOR - Ritesh Kumar Singh
'''

import sys,threading
import math
from collections import defaultdict,Counter
input = sys.stdin.readline

def rl(type):
	return [type(w) for w in input().split()]

def reverse(arr):
	return arr[-1::-1]

def mod(a,m):
	return (a%m + m)%m

def check_prime(n):
	temp = int(math.sqrt(n) + 1)
	for i in range(2,temp):
		if n % i == 0:
			return False
	return True

def create_graph(n):
	graph = {}
	for _ in range(n):
		x,y = map(int,input().split())
		graph[x].append(y)
		graph[y].append(x)
	return graph

#driver code
def main():
	for _ in range(int(input())):
		n = int(input())
		arr = rl(int)
		if arr.count(arr[0]) == len(arr):
			print(-1)
		elif n == 2:
			print(1 if arr[0] > arr[1] else 2)
		else:
			maxi = max(arr)
			prev = 10000000000
			nex = arr[1]
			for i in range(len(arr)):
				if arr[i] == maxi  and (arr[i] > prev or arr[i] > nex):
					break
				prev = arr[i]
				nex = arr[i+2] if i + 2 < len(arr) else 10000000000
			print(i+1)

sys.setrecursionlimit(10**6)
threading.stack_size(10**8)
t = threading.Thread(target=main)
t.start()
t.join()
