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

def main():
    outputs = []
    for __ in range(int(input())):
        n = int(input())
        B = list(map(int, input().split()))
        A = B[:]
        l = 0
        r = 1
        eaten =0
        maxm_index = 0
        while r < n:
            if A[l] > A[r]:
                A[l] += 1
                r += 1
                eaten += 1
                if A[maxm_index] < A[l]:
                    maxm_index = l
            elif A[r] > A[l]:
                A[r] += (eaten+1)
                l = r
                r += 1
                if A[maxm_index] < A[l]:
                    maxm_index = l
                eaten += 1
            else:
                if B[maxm_index] < A[r]:
                    A[r] += (eaten + 1)
                    l = r
                    r += 1
                    eaten += 1
                else :
                    l += 1
                    r += 1
        if A[l] > max(B):
            outputs.append(l+1)

        else:
            outputs.append(-1)

    for output in outputs:
        print(output)

if __name__ == '__main__':
    main()


