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 sys
input = lambda : sys.stdin.readline().rstrip()


def answer():
    n = int(input())
    nums = map(int, input().split(" "))

    max_num = max(nums)
    max_num_is = [i for i, num in enumerate(nums) if num == max_num]

    found = False
    for i in max_num_is:
        if i >= 1:
            if max_num > nums[i-1]:
                found = True
                out = i+1

        if i <= n-2:
            if max_num > nums[i+1]:
                found = True
                out = i+1
        if found:
            break
        
    if not found:
        out = -1
    print(out)
   

nn = int(input())
for i in range(nn):
    answer()