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
import bisect as bi
import collections as cc
import heapq as hp
input=sys.stdin.readline
I=lambda:list(map(int,input().split()))
ar=[]
for i in range(1,10):
    j=str(i)
    while int(j)<=10000:
        ar.append(int(j))
        j+=str(i)
for tc in range(int(input())):
    n,=I()
    l=I()
    x=max(l)
    tf=0
    ind=-1
    for i in range(n):
        if l[i]==x:
            if i-1>=0 and l[i-1]<l[i]:
                tf=1
                ind=i
                break
            elif i+1<n and l[i+1]<l[i]:
                tf=1
                ind=i
                break
    if not tf:
        print(-1)
    else:
        print(ind+1)
