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 solve(arr,n):

    if len(set(arr)) == 1:
        return -1

    maxx = arr[0]
    tmp_idx = 0
    for i in range(1,len(arr)):
        if arr[i] > maxx:
            tmp_idx = i
            maxx = arr[i]

    if tmp_idx == 0 and arr[tmp_idx] == arr[tmp_idx + 1]:
        while arr[tmp_idx] == arr[tmp_idx + 1]:
            tmp_idx += 1
            
    if arr[tmp_idx] == arr[tmp_idx-1] and arr[tmp_idx] == arr[tmp_idx+1]:
        return -1

    return tmp_idx+1

def main():

    t = int(input())

    for q_itr in range(t):
        n = int(input())
        arr = list(map(int,input().split()))

        print(solve(arr,n))

if __name__ == "__main__":
    main()