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())

# Run each test case
for _ in range(T):
  # Get number of piranhas
  N = int(input())
  
  # Get piranhas sizes
  piranhas = [int(p) for p in input().split(' ')]
  
  # Track the index of a piranha with largest size found yet, and which has
  # at least one adjacent smaller piranha
  # At the end, that piranha can eat the adjacent piranha and therefore eat
  # every other piranha in the aquarium
  largest_index = None

  # Iterate over piranhas and find the bigger one with adjacent smaller piranhas
  for i in range(len(piranhas)):
    # If this piranha is bigger than currently largest piranha...
    if largest_index == None or piranhas[i] > piranhas[largest_index]:
      # ... and has smaller adjacent piranhas
      if (i > 0 and piranhas[i - 1] < piranhas[i]) or \
          (i < N - 1 and piranhas[i + 1] < piranhas[i]):
        largest_index = i

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