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, os
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))
# read_f = lambda file:  list(map(int, file.readline().strip().split()))

# from time import time

# sys.setrecursionlimit(10**6)

MOD = 10**9 + 7



def main():
	# file1 = open("C:\\Users\\shank\\Desktop\\Comp_Code\\input.txt", "r")
	# n = int(file1.readline().strip()); 
	# arr = list(map(int, file1.read().strip().split(" ")))
	# file1.close()
	ans_ = []
	for _ in range(int(input())):
		n = int(input()); arr = read()
		if len(set(arr)) == 1:
			ans_.append("-1")
		else:
			x = max(arr)
			for i in range(n):
				if arr[i] == x:
					if i+1 < n and arr[i+1] < x:ind = i+1
					elif i-1 > -1 and arr[i-1] < x:ind = i+1
			ans_.append(str(ind))
	print(("\n").join(ans_))



	# file = open("output.txt", "w")
	# file.write(ans+"\n")
	# file.close()

if __name__ == "__main__":
	main()

