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 i in range(t):
    n=int(input())
    s=0
    x=input()
    l=[int(i) for i in x.split()]
    if l.count(l[0])==len(l):
        print(-1)
    else:
        maxx=max(l)
        for i in range(len(l)):
            if l[i]==maxx:
                if i==0:
                    if l[0]>l[1]:
                        print(1)
                        break
                elif i==n-1:
                    if l[n-1]>l[n-2]:
                        print(n)
                        break
                else:
                    if l[i]>l[i+1] or l[i]>l[i-1]:
                        print(i+1)
                        break
                        
