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
#sys.setrecursionlimit(10**7)
#from sys import stdin,stdout
import math
#import random
#import heapq
from collections import Counter
#from queue import PriorityQueue
#from functools import lru_cache
#@lru_cache(maxsize=None) #for optimizing the execution time of callable objects/functions(placed above callable functions)
try:
    for _ in range(int(input())):
        n=int(input())
        arr=[int(i) for i in input().split()]
        flg=0
        mx=max(arr)
        for idx in range(n):
            if arr[idx]==mx:
                if idx!=0 and idx!=n-1:
                    a=arr[idx-1]
                    b=arr[idx+1]
                    if a<mx or b<mx:
                        ans=idx+1
                        flg+=1
                        break
                elif idx==0:
                    if arr[idx+1]<mx:
                        ans=idx+1
                        flg+=1
                        break
                else:
                    if arr[idx-1]<mx:
                        ans=idx+1
                        flg+=1
                        break
        if flg:
            print(ans)
        else:
            print(-1)



        
except EOFError as e:
    print(e)
