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

t = int(input())
cases = []
for i in range(t):
    n = int(input())
    fish = list(map(int, input().strip().split()))
    cases.append(fish)

def solve(fish):
    m = max(fish)
    c = fish.count(m)
    if c == 1:
        return fish.index(m) +1
    if c == len(fish):
        return -1
    else:
        for i,f in enumerate(fish):
            if f == m:
                if i < len(fish)-1:
                    if fish[i+1] < m:
                        return i+1
                if i > 0: 
                    if fish[i-1] < m:
                        return i+1

for case in cases:
    print(solve(case))
