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

def solve(n, a):
    peak_ind = None
    peak_val = 0
    if a[0] > a[1]:
        peak_ind = 0
        peak_val = a[0]
    if a[n-1] > a[n-2] and a[n-1] > peak_val:
        peak_ind = n-1
        peak_val = a[n-1]
    for i in range(1, n-1):
        if (a[i-1] <= a[i] >= a[i+1]) and (a[i] > a[i-1] or a[i] > a[i+1]):
            if a[i] > peak_val:
                peak_ind = i
                peak_val = a[i]
    if peak_ind != None:
        return peak_ind + 1
    else:
        return -1

t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    print(solve(n, a))