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

from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
from random import randint as R
###################################
for _ in range(int(input())):
    n=int(input())
    A=INPUT()
    if len(set(A))==1:
        print(-1)
        #print()
        continue
    mx=max(A)
    for i in range(n):
        if A[i]==mx:
            if i==0:
                if A[i+1]<mx:
                    ans=i
            elif i==n-1:
                if A[i-1]<mx:
                    ans=i
            else:
                if A[i+1]<mx or A[i-1]<mx:
                    ans=i
    print(ans+1)
    #print()
