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

t = int(input())
for _ in range(t):
  n = int(input())
  my_list = list(map(int, input().split(' ')))
  if [my_list[0]] * len(my_list) == my_list:
    print(-1)
  else:
    maximum = max(my_list)
    max_list = [i for i in range(n) if my_list[i] == maximum]
    for i in range(len(max_list)):
      curr_ind = max_list[i]
      condition_one = curr_ind - 1 >= 0 and my_list[curr_ind - 1] < maximum
      condition_two = curr_ind + 1 <= n - 1 and my_list[curr_ind + 1] < maximum
      if condition_one or condition_two:
        print(curr_ind + 1)
        break
      