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
#from collections import deque #Counter


def rl():
    return sys.stdin.readline().strip()

def pr( something ):
    sys.stdout.write( str(something) + '\n')
def pra( array ):
    sys.stdout.write( ' '.join([str(x) for x in array]) + '\n')


def solve(array):

    mx = max(array)
    dom_i = -1
    if array[0] == mx and array[1] < mx:
        dom_i = 1
    elif array[-1] == mx and array[-2] < mx:
        dom_i = len(array)
    else:
        for i in range(1,len(array)-1):
            if array[i] == mx and (array[i-1] < mx or array[i+1] < mx):
                dom_i = i+1
                break
    return dom_i


if __name__ == '__main__':

    NT = int( rl() )

    for ti in range(NT):
        _ = rl()
        array = [int(x) for x in rl().split(' ')]
        res = solve(array)

        pr(res)

