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 Ghost {

	public static void main(String[] args) {
		
		
		Scanner sc = new Scanner(System.in);
		System.out.println(98);
           int t = sc.nextInt();
	     
	    for(;t>0;t--) {
	    	int a = sc.nextInt();
	    	int [] arr = new int[a];
	    	int i ;
	    	int p ;
	    	int q ;
	    	int check=0;
	    	
	    	
	    	
	    	for(i=0;i<a;i++) {
	    		
	    		arr[i] = sc.nextInt();
	    	}
	    	
	    	
	    	
	    	for(q=0;q<(a-1);q++) {
	    		if (arr[q] == arr[q+1]) {
	    			check=1;
	    		}
	    		else {
	    			check=-1;
	    			break;
	    		}
	    			
	    		
	    			    		
	    	}
	    	if(check==-1) {
	    		
	    	int largest = 0;
	    	
	    	for(i=1;i<a;i++) {
	    		
	    		if(arr[i]> arr[largest]) {
	    			largest = i;
	    			
		    		 }
		    	}
	    	
	    	if(largest == 0) {
	    		if(arr[0] == arr[1]) {
	    			System.out.println(1);
	    		}
	    		
	    		else System.out.println(0);
	    			
	    	}
	    	
	    	else if (largest == (a-1)) {
	    		if(arr[a-1]== arr[a-2]) {
	    			System.out.println(a-1);
	    		}
	    	}
	    	
	    	else
	    		System.out.println(largest +1);
		    	
	    	}
	    	 
	    	
	    	 if (check==1) {
	    		System.out.println("-1");
	    	}
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    }
	    	
	    	

	    	
	    	
	    	
	    }

	}