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 iii in range(int(input())):
    n = int(input())
    lst = list(map(int, input().split()))
    mx = -100
    cnt = 0
    maxes = []
    for i in range(n):
        if lst[i] > mx:
            mx = lst[i]
            cnt = 1
            maxes = [i]
        elif lst[i] == mx:
            cnt+=1
            maxes.append(i)
            
    if len(maxes) == 1:
        print(maxes[0] + 1)
        continue
    
    elif len(maxes) == n:
        print(-1)
    
    else:
        for i in maxes:
            if (i-1>=0 and lst[i-1] < lst[i]) or (i+1<n and lst[i+1]<lst[i]):
                print(i+1)
                break
        else:
            print(-1)
        
        
        
            