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

# num of test cases
T = int(input())
for _ in range(T):
  # number of piranhas
  N = int(input())
  # piranhas sizes
  piranhas = [int(p) for p in input().split(' ')]
  # track piranhas with largest size and its index
  largest_index = None

  for i in range(len(piranhas)):
    if largest_index == None or piranhas[i] > piranhas[largest_index]:
      if (i > 0 and piranhas[i - 1] < piranhas[i]) or \
          (i < N - 1 and piranhas[i + 1] < piranhas[i]):
        largest_index = i
        largest_size = piranhas[i]

  print(largest_index + 1 if largest_index != None else -1)
