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())):
    x = int(input())
    a = [int(i) for i in input().split()]
    n = max(a)
    ans = -2
    if(x == 1):
        ans = 0
    elif(x == 2):
        if(a[0] > a[1]):
            ans = 0
        elif(a[1] > a[0]):
            ans = 1
    else:
        for i in range(x):
            if(a[i] == n):
                if(i > 0 and i < x - 1):
                    if(a[i+1] < n or a[i-1] < n):
                        ans = i 
                        break
                elif(i == 0):
                    if(a[i+1] < n):
                        ans = i 
                        break
                elif(i == x-1):
                    if(a[i-1] < n):
                        ans = i 
                        break
    print(ans+1)
            
        
        
    