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 _ in range(t):
    n=int(input());
    l=list(map(int,input().split()))
    c=1
    a=l[0];
    for i in range(1,n):
        if l[i]==a:
            c+=1
        else:
            break;
    if(c==n):
        print(-1)
    else:
        m=l[0]
        x=0
        y=0
        for i in range(1,n):
            if m<l[i]:
                x=i
                m=l[i];
        if x==(n-1):
            print(n)
            break;
        else:
            for i in range(x,n):
                if l[i]!=m:
                    y=i-1
                    break;
            for i in range(x,-1,-1):
                if l[i]!=m:
                    y=i+1;
                    break;
        print(y+1)