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 collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2, floor
from bisect import bisect_right, bisect_left, bisect

from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2**20)


def ncr(n, r):
    r = min(r, n - r)
    numer = reduce(op.mul, range(n, n - r, -1), 1)
    denom = reduce(op.mul, range(1, r + 1), 1)
    return numer // denom  # or / in Python 2


def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return (list(factors))


def sumDigits(no):
    return 0 if no == 0 else int(no % 10) + sumDigits(int(no / 10))

MOD = 1000000007
PMOD = 998244353
N = 10**9 + 7
LOGN = 30
T = 1
T = int(stdin.readline())
for _ in range(T):
    # a, b = list(map(int, stdin.readline().rstrip().split()))
    n = int(stdin.readline())
    a = list(map(int, stdin.readline().rstrip().split()))
    # b = list(map(int, stdin.readline().rstrip().split()))
    # c = list(map(int, stdin.readline().rstrip().split()))
    # a = str(stdin.readline().strip('\n'))
    # b = list(stdin.readline().strip('\n'))
    # m = int(stdin.readline())
    # s = list(map(int, stdin.readline().rstrip().split())
    if n == 1:
        print(a[0])
        continue
    mx = max(a)
    ix = []
    ans = -1
    for i in range(1, n - 1):
        if a[i] == mx and (a[i] > a[i - 1] or a[i] > a[i + 1]):
            ans = i + 1
            break
    if ans == -1:
        if a[0] == mx and a[1] < mx:
            print(1)
        elif a[-1] == mx and a[-2] < mx:
            print(n)
        else:
            print(-1)
    else:
        print(ans)
