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

n = int(input())
for i in range(n):
    x = int(input())
    ps = list(map(int, input().split()))
    if len(set(ps)) == 1:
        print(-1)
    else:
        maxx = 0
        first = 0
        ans = None
        for j in range(len(ps)):
            if ps[j] > maxx:
                maxx = ps[j]
                first = j
            if ps[j] == maxx and ((j + 1 < len(ps) and ps[j + 1] < maxx) or (j != 0 and ps[j - 1] < maxx)):
                ans = j
        print(ans + 1)