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

# if all are the same size, there is no dominant
# otherwise, return max that is next to lower number

T = int(input())

for t in range(T):
    n = int(input())
    piranhas = [int(x) for x in input().split(' ')]
    if all([piranhas[i] == piranhas[i+1] for i in range(n-1)]):
        print(-1)
    else:
        dom = max(piranhas)
        for i in range(n-1):
            if piranhas[i] == dom and piranhas[i + 1] < dom:
                print(i+1)
                break
            elif piranhas[i] < dom and piranhas[i + 1] == dom:
                print(i+2)
                break
