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

tc = int(input())
while tc > 0:
    n = int(input())
    nums = list(map(int, input().split(" ")))
    mx = max(nums)
    ans = -1
    for i in range(0, len(nums)-1):
        if mx == nums[i] and mx > nums[i+1]:
            ans = i + 1
            break
    if ans == -1 and len(nums)>1 and nums[-1] > nums[-2]:
        ans = len(nums)

    print(ans)
    tc -= 1