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())
j = 0
while j < t:
    j = j + 1
    y = int(input())
    x = [int(i) for i in input().split()]
    z = x.copy()
    z.sort(reverse=True)
    
    i = 1

    n = x.index(z[0])
    if n == 0:
        while i < y:
            if z[0] == z[-1]:
                print(-1)
                break
            elif x[n] == x[n+1]:
                n = n + 1
            elif x[n] > x[n+1]:
                print(n+1)
                break
            else:
                print(-1)
    else:
        print(n+1)
