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 _ in range((int)(input())):
    n=(int)(input())
    l=list(map(int,input().split()))
    # a,b=map(int,input().split())
    v=max(l)
    noa=-1
    ll=len(list(set(l)))
    if ll==1:
        print(noa)
    else:
        res=0
        for i in range(n):
            if l[i]==v :
                if i==0 and i <1 and l[i+1]!=l[i]:
                    res=i+1
                    print(res)
                    xx=list()
                    xx.append(i)
                    break
                elif i==n-1 and l[n-1]!=l[n-2]:
                    res=n
                    print(res)
                    break
                elif i>0 and i<n-1 and 2<3 :
                    vu=len(l)
                    if l[i]!=l[i+1] or l[i]!=l[i-1]:
                        print(i+1)
                        break