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

from collections import Counter, defaultdict, deque
import bisect
import heapq
from sys import stdin, stdout
from itertools import repeat
import math
import random

# sys.stdin = open('input')

def mod(x, y, mod):
    re = 1
    now = x
    while y:
        if y&1:
            re *= now
            re %= mod
        y >>= 1
        now = (now*now)%mod
    return re

def inp(force_list=False):
    re = map(int, raw_input().split())
    if len(re) == 1 and not force_list:
        return re[0]
    return re

def inst():
    return raw_input().strip()

def gcd(x, y):
   while(y):
       x, y = y, x % y
   return x

def ggcd(x, y):
    if y:
        return ggcd(y, x%y)
    return x

MOD = int(1e9+7)




def my_main():
    T = inp()
    hp = []
    for _ in range(T):
        n = inp()
        da = inp(True)
        mx = max(da)
        idx = -1
        if da[0]==mx:
            for i in range(n):
                if da[i]!=mx:
                    idx = i
                    break
        else:
            for i in range(n):
                if da[i]==mx:
                    idx = i+1
                    break
        print idx



my_main()
