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

test_case = int(input())
for _ in range(test_case):
    n = int(input())
    a = list(map(int, input().split()))
    if len(set(a)) == 1:
        print(-1)
    else:
        max_number = max(a)
        max_number_idxs = []
        for i in range(n):
            if a[i] == max_number:
                max_number_idxs.append(i)
        ok = []
        if len(max_number_idxs) == 1:
            print(max_number_idxs[0] + 1)
        else:
            for i in range(len(max_number_idxs)):
                if max_number_idxs[i] - 1 >= 0:
                    if a[max_number_idxs[i] - 1] < max_number:
                        ok.append(max_number_idxs[i])
                if max_number_idxs[i] + 1 <= n - 1:
                    if a[max_number_idxs[i] + 1] < max_number:
                        ok.append(max_number_idxs[i])
            print(ok[0] + 1)