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 find_dominant(fishes):
    maximum = max(fishes)
    length = len(fishes)
    i = 0
    for i in range(length):
            if fishes[i] == maximum:
                if i:
                    if i < length - 1 and (fishes[i + 1] < maximum or fishes[i - 1] < maximum):
                        return i
                    elif i == length - 1 and fishes[i-1] < maximum:
                        return i
                if not i and fishes[i+1] < maximum:
                    return i
    return -1

for test in range(int(input())):
    m = int(input())
    fishes = list(map(int, input().split()))[:m]
    result = find_dominant(fishes)
    print(result + 1 if result >= 0 else result)
