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 i in range(int(input())):
    n = int(input())
    li = list(map(int, input().split()))
    mx = max(li)
    idx = -1
    if li[0] == mx and li[1] < li[0]:
        print(1)
    elif li[-1] == mx and li[-2] < li[-1]:
        print(n)
    else:
        for i in range(1, n - 1):
            if li[i] == mx and (li[i - 1] < mx or li[i + 1] < mx):
                idx = i
                break

        if idx != -1:
            print(idx + 1)
        else:
            print(idx)
