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

for s in[*open(0)][2::2]:
    l=list(map(int,s.split()))
    a=0;c=sum(l[a]!=i for i in l)
    for i in range(1,len(l)-1):
        if l[a]<=l[i]:
            if l[i-1]!=l[i] or l[i+1]!=l[i]:a=i
    if l[-1]>l[a]:a=len(l)-1
    print((-1,a+1)[c>0])