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

t = int(input())

for i in range(t) :
    #get values
    n = int(input());
    
    values = list( map(int, input().split(' ')) );

    #do some stuff
    val = 0;
    res = -2;

    for j in range(n) :
        jl = max(0, j-1);
        jr = min(n-1, j+1);

        v = values[j];
        vl = values[jl];
        vr = values[jr];

        if v > val and (v > vl or v > vr) :
            val = v;
            res = j;
    print(res+1);

    
#help me
#i just want to play my guitar
#but they make me write bad code
#that doesn't work
