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
from collections import defaultdict
input=stdin.readline
print=stdout.write
for _ in range(int(input())):
    n=int(input())
    fish=list(map(int,input().split()))
    M= max(fish)
    allsame=True
    for i in range(n):
        if(fish[i]!=M):
            allsame=False
            break

    if(allsame):
        print("-1\n")
    else:
        index=0
        for i in range(n):
            if(i==0 and fish[0]==M):
                if(fish[0]>fish[1]):
                    index=i+1
                    break
            elif(i==n-1 and fish[i]==M):
                if(fish[i-1]<fish[i]):
                    index=i+1
                    break
            elif(fish[i-1]<fish[i] or fish[i]>fish[i+1]):
                if(fish[i]==M):
                    index=i+1
                    break
        print(str(index)+"\n")
                