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())
for i in range(t):
    n = int(input())
    s1 = list(map(int, input().split()))
    if max(s1) == min(s1) :
        print(-1)
    else :
        mx = max(s1)
        it = 0 
        for j in range(n):
            if s1[j] == mx and (s1[max(0, j -1)] < s1[j] or s1[min(n - 1, j + 1)] < s1[j]):
                it = j + 1
        print(it)
