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

#!/usr/bin/env python3
# created : 2020. 12. 31. 23:59

import os
from sys import stdin, stdout


def solve(tc):
    n = int(stdin.readline().strip())
    seq = list(map(int, stdin.readline().split()))

    allSame = True
    for i in range(1, n):
        if seq[i] != seq[i-1]:
            allSame = False
            break

    if allSame:
        print(-1)
        return

    maxi = -1
    ans = -1
    for i in range(n):
        if seq[i] > maxi:
            if (i>0 and seq[i]>seq[i-1]) or (i<n-1 and seq[i]>seq[i+1]):
                maxi = seq[i]
                ans = i+1
    print(ans)


tcs = 1
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1
