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 os
import sys
import math
import collections
#from bisect import bisect_left as bl                #c++ lowerbound bl(array,element)
#from bisect import bisect_right as br               #c++ upperbound br(array,element)
def get_int(): return int(input())
def get_ints(): return map(int, input().split())
def get_strs(): return input().split()
def get_float(): return float(input())
def get_floats(): return map(float, input().split())
def list_strs(): return list(input().split())
def list_ints(): return list(map(int, input().split()))
def list_floats(): return list(map(float, input.split()))
def post(x): print(x, end=' ')

T = int(input())


for t in range(1, T+1):
    n = get_int()
    a = list_ints()
    if len(set(a)) == 1:
        print(-1)
    else:
        large = max(a)
        flag = True
        for i in range(n):
            if a[i] == large and flag:
                if i == 0:
                    if a[i] > a[i+1]:
                        res = i
                        flag = False
                elif i == n-1:
                    if a[i] > a[i-1]:
                        res = i
                        flag = False
                else:
                    if a[i] > a[i-1] or a[i] > a[i+1]:
                        res = i 
                        flag = False

        print(res+1)
            

    