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 math
import sys
import collections
import bisect

#sys.setrecursionlimit(1000000000)

input = sys.stdin.readline
flush = sys.stdout.flush

readint    =lambda: int(input())
readintm   =lambda: map(int,input().strip().split())
readintl   =lambda: list(map(int,input().strip().split()))

readfloatm =lambda: map(float,input().strip().split())
readfloatl =lambda: list(map(float,input().strip().split()))

readstr    =lambda: input().strip()
readstrl   =lambda: list(input().strip())

join       =lambda x,l: x.join(map(str,l))
print      =lambda *x: sys.stdout.write(" ".join(map(str,x))+'\n')
printl	   =lambda l: sys.stdout.write(" ".join(map(str,l))+'\n')

ceil       =lambda x,y: (x+y-1)//y
mod        =1000000007

# START HERE

def test(nums, i, num):
	l = i-1
	r = i+1
	while l >= 0 or r < len(nums):
		if l >= 0 and nums[l] < num:
			l -= 1
			num += 1
		elif r < len(nums) and nums[r] < num:
			r += 1
			num += 1
		else:
			return False
	return True

for _ in range(readint()):
	n = readint()
	nums = readintl()
	high = max(nums)
	for i, num in enumerate(nums):
		if num == high and test(nums, i, num):
			print(i+1)
			break
	else:
		print(-1)






