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

#!/usr/bin/env pypy3

def ans(fishes):
    if len(set(fishes)) == 1:
        return -1
    target = max(fishes)

    for i in range(len(fishes)):
        if fishes[i] == target and i+1 < len(fishes) and fishes[i+1] < target: return 1+i
        if fishes[i] == target and i-1 >= 0 and fishes[i-1] < target: return 1+i
    return '?'

for _ in range(int(input())):
    input()
    fishes = list(map(int, input().split()))
    print(ans(fishes))