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;
public class testingJava2{

     public static void main(String[] args){
       int t = 0;
       Scanner sc = new Scanner(System.in);
       t = sc.nextInt();
       int[] n = new int[t];
     
       for(int i=0;i<t;i++) {
    	   n[i] = sc.nextInt();
    	   int[] sizes = new int[n[i]];
    	   
    	   for(int j=0;j<n[i];j++) {
    		   sizes[j] = sc.nextInt();
    	   }
    	   
    	   solve(n[i],sizes);
       }
             
     }
     
          
     
     public static void solve(int n,int[] sizes) {
    	 int fans = -1;
    	 int greatest = 0;
    	 
    	 for(int i=0;i<n;i++) {
    		 if(i!=(n-1)) {
    			 if(sizes[i] == sizes[i+1]) {
    				continue; 
    			 }
    			 if(sizes[i]>greatest) {
    				 greatest = sizes[i];
    				 fans = i+1;
    			 }
    		 }
    		 else { 
    			 if (sizes[i] == sizes[i-1]) {
    			 	if(greatest == 0) {
    				 	fans = -1;
    			 	}
    			 	else if(sizes[i]>greatest) {
    			 		greatest = sizes[i];
    			 		fans = i+1;
    			 	}
    		 	}
    			
    		 }
    	 }
    	 
    	 
    	 System.out.println(fans);
     }
         
}