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

test_cases = int(input())
for i in range(test_cases):
    num = int(input())
    lst = list(map(int, input().split()))
    maxim = max(lst)
    if lst[1:] == lst[:-1]:
        print('-1')
    else:
        for i in range(1, num):
            #print("lst i-1 = ",lst[i-1])
            #print("lst i = ",lst[i])
            #print("lst num -1 = ",lst[num - 1])
            if lst[0] == maxim and lst[0] > lst[1]:
                dominant = 1
                break
            elif lst[num - 1] == maxim and lst[num - 2] < lst[num - 1]:
                dominant = num
                break
            elif (lst[i-1] < lst[i] and lst[i] == maxim) or (lst[i+1] < lst[i] and lst[i] == maxim):
                dominant = i + 1
                break
        print(dominant)
