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

def pirana(values):
    index=float('-inf')
    maximum=max(values)
    for i in range(0,len(values)):
        if i==0 and values[i]==maximum and values[i+1]<maximum:
            index=i
        if i>0 and values[i]==maximum and i<len(values)-1:
            if values[i-1]<maximum or maximum>values[i+1]:
                index=i
        if i==len(values)-1 and values[i]==maximum and values[i-1]<maximum:
            index=i
    if index==float('-inf'):
        return -1
    return index+1
t=int(input())
for i in range(t):
    n=int(input())
    values=list(map(int,input().split()))
    print(pirana(values))
