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,math
from collections import deque,defaultdict
import operator as op
from functools import reduce

sys.setrecursionlimit(10**6) 

I=sys.stdin.readline

 #s="abcdefghijklmnopqrstuvwxyz"

"""
x_move=[-1,0,1,0,-1,1,1,-1]
y_move=[0,1,0,-1,1,1,-1,-1]
"""
def ii():
	return int(I().strip())
def li():
	return list(map(int,I().strip().split()))
def mi():
	return map(int,I().strip().split())

def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer // denom

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

def valid(row,col,rows,cols,rcross,lcross):
 	return rows[row]==0 and cols[col]==0 and rcross[col+row]==0 and lcross[col-row]==0





def main():
	ans=""
	for _ in range(ii()):
		n=ii()
		arr=li()
		flag=1
		for i in range(1,n):
			if arr[i]!=arr[i-1]:
				flag=0
				break
		if flag:
			ans+="-1\n"
		else:
			maxi=max(arr)
			for i in range(n):
				if arr[i]==maxi:
					if i==0:
						if arr[i+1]==maxi:
							continue
						else:
							ans+="1\n"
					elif i==n-1:
						ans+=str(n)+"\n"
					else:
						if arr[i-1]!=maxi or arr[i+1]!=maxi:
							ans+=str(i+1)+"\n"
						else:
							continue
					break




	print(ans)




			
		
			



		


	
			
						
			








	





			
		



	
			





	

























	
	
	





if __name__ == '__main__':
	main()