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

import java.util.Scanner;

/**
 * Accomplished using the EduTools plugin by JetBrains https://plugins.jetbrains.com/plugin/10081-edutools
 */

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int c = sc.nextInt();
      for (int i = 0; i < c; i++) {
         int n = sc.nextInt();
         int[] arr = new int[n];
         for (int j = 0; j < n; j++) {
            arr[j] = sc.nextInt();
         }
         int max = 0;
         boolean found = false;
         for (int j = 0; j < n; j++) {
            if (arr[j] >= arr[max]) {
               if ((j - 1 >= 0 && arr[j - 1] != arr[j]) || (j + 1 < n && arr[j + 1] != arr[j])) {
                     max = j;
                     found = true;

               }
            }
         }

         if (!found) {
            System.out.println(-1);
         } else {
            System.out.println(max + 1);
         }

      }
   }
}