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

import math
t=int(input())
for w in range(t):
    n=int(input())
    l=[int(i) for i in input().split()]
    m=max(l)
    if(l.count(m)==n):
        print(-1)
    else:
        k=0
        for i in range(1,n-1):
            if(l[i]==m and (l[i-1]<m or l[i+1]<m)):
                k=i+1
                break
        if(k==0):
            if(l[0]==m and l[1]<m):
                print(1)
            elif(l[-1]==m and l[n-2]<m):
                print(n)
        else:
            print(k)