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

x=int(input())
for i in range(0,x):
    n=int(input())
    m=list(map(int,input().split()))[:n]
    d=max(m)
    s=-1
    for j in range(0,n):
        if(m[j]==d):
            if(j):
                if(m[j-1]!=d):
                    s=j+1
            if(j!=(n-1)):
                if(m[j+1]!=d):
                    s=j+1
    print(s)
