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

tmp=int(input())
for _ in range(tmp):
    nVar=int(input())
    arr=[int(someVar) for someVar in input().split()]

    if arr.count(arr[0])==nVar:
        print(-1)
    else:
        indexVal=-1

        maxVal=max(arr)
        for ite in range(nVar):
            if arr[ite]==maxVal:
                if ite>0:
                    if arr[ite-1]<maxVal:
                        indexVal=ite
                if ite<nVar-1:
                    if arr[ite+1]<maxVal:
                        indexVal=ite
        if indexVal==-1:
            print(-1)
        else:
            print(indexVal+1)
