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

t = int(input())
while t > 0:
    t -= 1
    n = int(input())
    A = list(map(int, input().split(' ')))

    large = []

    m = max(A)

    for i in range(n):
        if A[i] == m:
            large.append(i + 1)

    if len(large) == 1:
        print(large[0])
    elif len(large) == n:
        print(-1)
    else:
        # print(large)
        for i in range(len(large)):
            if large[i] == 1:
                if 2 not in large:
                    print(1)
                    break
            elif large[i] == n:
                if n - 1 not in large:
                    print(n)
                    break
            else:
                index=large[i]-1
                if index>0:
                    if A[index-1]!=A[index]:
                        print(large[i])
                        break
                if index<n-1:
                    if A[index+1]!=A[index]:
                        print(large[i])
                        break