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 i in range(int(input())):
    l=int(input())
    p=list(map(int,input().split()))
    a=max(p)
    ans=True
    for j in range(len(p)-1):
        if p[j]==a :
            if p[j+1]<a:
                print(j+1)
                ans=False
                break
            elif j>0 and p[j-1]<a:
                print(j+1)
                ans = False
                break
    if p[-1]==a and ans and p[-2]<a:

        print(l)
        ans=False
    if ans or len(set(p))==1:
            print(-1)



