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 safe_pos(i, size):
    if i == 0:
        return [i + 1, i + 1]
    elif i == size - 1:
        return [i - 1, i - 1]
    else:
        return [i - 1, i + 1]


def solve():
    n = int(input())
    array = list(map(int, input().split()))
    maxElem = max(*array)
    for i in range(len(array)):
        if array[i] == maxElem:
            l, r = safe_pos(i, len(array))
            if array[i] > array[l] or array[i] > array[r]:
                print(i + 1)
                return
    print(-1)

tests = int(input())
while tests > 0:
    solve()
    tests -= 1
