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

def checkSides(index, arr, size):
    left = True if index-1 >= 0 and arr[index-1] < arr[index] else False
    right = True if index+1 < size and arr[index+1] < arr[index] else False
    return left or right

tests = int(input())
for t in range(tests):
    size = int(input())
    A = list(map(int, input().split()))
    found = False
    maxx = max(A)
    for i in range(size):
        if A[i] == maxx:
            if checkSides(i, A, size):
                print(i+1)
                found = True
                break
    if not found:
        print(-1)