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 check(i, a):
    left = i-1
    while left >= 0:
        if a[left] != -1:
            if a[left] < a[i]:
                a[left] = -1
                a[i] += 1
                return(True)
            else:
                break
        else:
            left -= 1

    right = i+1
    while right < len(a):
        if a[right] != -1:
            if a[right] < a[i]:
                a[right] = -1
                a[i] += 1
                return(True)
            else:
                break
        else:
            right += 1
    return(False)
    

for _ in range(int(input())):
    input()
    a = [int(i) for i in input().split()]
    max_i = max(a)
    pi = -1
    for k in range(len(a)):
        if a[k] == max_i:
            if (k-1 >=0 and a[k-1] < a[k]) or (k+1 < len(a) and a[k+1] < a[k]):
                pi = k+1
    print(pi)
        
