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
import bisect
from sys import stdin,stdout
from math import floor,sqrt,log
from collections import defaultdict as dd
from bisect import bisect_left as bl,bisect_right as br
mod=1000000007
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def mod_inverse(a, n):
    N = n
    xx = 0
    yy = 1
    y = 0
    x = 1
    while(n > 0):
        q = a // n
        t = n
        n = a % n
        a = t
        t = xx
        xx = x - q * xx
        x = t
        t = yy
        yy = y - q * yy
        y = t
    x %= N
    x += N
    x %= N
    return x
def SieveOfEratosthenes(n): 
    prime = [True for i in range(n + 1)] 
    p = 2
    while (p * p <= n):  
        if (prime[p] == True):  
            for i in range(p * 2, n + 1, p): 
                prime[i] = False
        p += 1
    prime[0]= False
    prime[1]= False
    # return all prime numbers below n in O(n*log(log(n))
    return prime
def solve():
    n=int(input())
    l=[int(i) for i in input().split()][:n]
    x=set(l)
    if len(x)==1:
        print(-1)
    else:
        temp=max(l)
        for i in range(1,n-1):
            if l[i]==temp and (l[i-1]!=temp or l[i+1]!=temp):
                print(i+1)
                break
        else:
            if l[0]==temp:
                print(1)
            else:
                print(n)
if __name__ == "__main__":
    testcase=int(sys.stdin.readline())
    for _ in range(testcase):
        solve()
