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

import sys
import math
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_list(): return list(map(int, sys.stdin.readline().strip().split()))
def get_string(): return sys.stdin.readline().strip()
def getMaxLength(arr, n):
    count = 0
    result = 0
    for i in range(0, n):
        if (arr[i] == 0):
            count = 0
        else:
            count += 1
            result = max(result, count)
    return result
for t in range(int(input())):
    n=int(input())
    arr=get_list()
    if len(set(arr))==1:
        print(-1)
        continue
    maxim=max(arr)
    pos=[]
    for i in range(n):
        if arr[i]==maxim:
            pos.append(i)
    for i in range(len(pos)):
        index=pos[i]
        if index==0:
            if arr[index+1]<maxim:
                print(index+1)
                break
        elif index==n-1:
            if arr[index-1]<maxim:
                print(index+1)
                break
        else:
            if arr[index+1]<maxim or arr[index-1]<maxim:
                print(index+1)
                break