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 itertools
import math
import sys
from collections import defaultdict

 
def is_debug():
    return '--debug' in sys.argv

def stdin_wrapper():
    data = '''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

'''
    
    for line in data.split('\n'):
        yield line
 
if not is_debug():
    def stdin_wrapper():
        while True:
            yield sys.stdin.readline()
 
inputs = stdin_wrapper()
 
def input_wrapper():
    return next(inputs)
 


def get_str():
    if is_debug():
        return input_wrapper()

    return input()

def get(_type):
    if _type == str:
        return get_str()

    return _type(input_wrapper())
 
def get_arr(_type):
    return [_type(x) for x in input_wrapper().split()]
 

def tuplerize(method):
    def wrap(*args, **kwargs):
        res = method(*args, **kwargs)
        if not isinstance(res, (tuple, list)):
            res = (res, )

        return res
    return wrap

''' Solution '''
@tuplerize
def solve(a):
    if len(set(a)) == 1:
        return -1

    _max = max(a)
    a.insert(0, float('inf'))
    a.append(float('inf'))

    
    for i in range(1, len(a)-1):
        
        if a[i] != _max:
            continue

        if a[i] > a[i-1] or a[i] > a[i+1]:
            return i


t = get(int)
for _ in range(t):
    l = get(int)
    a = get_arr(int)
    print(*solve(a))