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 y_qtr in range (t):
    n=int(input())
    s=list(map(int,input().rstrip().split()))
    ans=True
    m=max(s)
    i=s.index(m)
    while (ans):
        if i+1<n :
            if s[i+1]<s[i]:
                print(i+1)
                ans=False
                break
            else:
                i=i+1

        if i-1>0:
            if s[i-1]<s[i]:
                print(i+1)
                ans=False
                break

        if i==n-1:
            break

    if(ans):
        print(-1)