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

for _ in range(int(input())):
    N = int(input())
    l = list(map(int, input().split()))
    if len(set(l)) > 1:
        max_ = max(l)
        r = l.index(max_)
        while True:
            if (l[max(0, r - 1)] < max_) | (l[min(N - 1, r + 1)] < max_):
                break
            else:
                r = l.index(max_, r + 1)
        print(r+1)
    else:
        print(-1)