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

# -*- coding: utf-8 -*-
"""
@author: Saurav Sihag
"""

rr = lambda: input().strip()
rri = lambda: int(rr())
# rri = lambda: int(stdin.readline())
rrm = lambda: [int(x) for x in rr().split()]
# stdout.write(str()+'\n')

from sys import stdin, stdout, setrecursionlimit
from math import ceil
from heapq import *

def sol():
    n=rri()
    nums=rrm()
    can=0
    res=-1
    x=max(nums)
    # print(x)
    for i, v in enumerate(nums):
        # print(i, v)
        if v==x and ((i>0 and nums[i]>nums[i-1]) or (i<n-1 and nums[i]>nums[i+1])):
            res=i+1
            can=x
            break
    print(res)    
    return 
    
def main():
    T = rri()
    for t in range(1, T + 1):
        ans=sol()
        # print("Case #{}: {}".format(t, ans))

main()