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

#count gap
#start from left most 1, if meets 0, temp += 1, meets 1
#again, count += temp, until end
def print_result(ans):
    print(ans)

def find_max(num_arr):
    return [i for i in range(len(num_arr)) if num_arr[i] == max(num_arr)]

def solve(num_arr):
    ans = -1
    max_arr = find_max(num_arr)
    for i in range(len(max_arr)):
        if max_arr[i] == 0:
            if num_arr[i+1] < num_arr[i]:
                return i + 1
        elif max_arr[i] == len(num_arr) - 1:
            if num_arr[i-1] < num_arr[i]:
                return i + 1
        else:
            if num_arr[i+1] < num_arr[i] or num_arr[i-1] < num_arr[i]:
                return i + 1

    return ans
    
#main
t = int(input())
for i in range(1, t+1):
    n = int(input())
    num_arr = list(map(int, input().split()))

    ans = solve(num_arr)
    
    print_result(ans)