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 dominantPhirana():
    n = int(input())
    aquarium = list(map(int, input().split()))
    if len(set(aquarium)) == 1:
        print(-1)
        return
    _max = float("-inf")
    index = -1
    for i, num in enumerate(aquarium):
        if num > _max:
            _max = num
            index = i 
        else:
            continue
    while True:
        if index:
            if (index < n-1 and aquarium[index] > aquarium[index+1]) or aquarium[index] >aquarium[index-1]:
                print(index)
                break
            index -= 1
        else:
            if aquarium[index] > aquarium[index + 1]:
                print(index)
                break
            index += 1

testcases = int(input())
while testcases:
    testcases -= 1
    dominantPhirana()