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.ArrayList;
import java.util.List;
import java.util.Scanner;

public class CodeForces {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for(int i =0;i<n;i++){
           int size = scanner.nextInt();
           int max = 0;
           int[] arr = new int[size];
           for(int j =0;j<arr.length;j++){
               arr[j] = scanner.nextInt();
               max = Math.max(arr[j],max);
           }
           int row = -1;
           for(int j =0;j<arr.length;j++){
               if(j == 0){
                   if(arr[j] == max && arr[j] > arr[j+1]) row = j+1;
               }
               else if (j == arr.length-1){
                   if(arr[j] == max && arr[j] > arr[j-1]) row = j+1;
               }
               else{
                   if((arr[j] == max && arr[j] > arr[j-1]) ||(arr[j] == max && arr[j] > arr[j+1]) ) row = j+1;
               }
           }
           System.out.println(row);
        }
    }
    
}
