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.*; 
public class Main
{
	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in); 
	    int n = scanner.nextInt();
	    
	    for(int i = 0; i < n; ++i){
	        int[] arr = new int[scanner.nextInt()]; 
	        
	        
	        boolean sameValue = true;
	        for(int j = 0; j < arr.length; ++j){
	            arr[j] = scanner.nextInt();
	        }
	        
	        int first = arr[0]; 
	        
	        for(int x : arr){
	            if(x != first){
	                sameValue = false;
	                break; 
	            }
	        }
	        
	        if(sameValue){
	            System.out.println("-1\n"); 
	            continue; 
	        }
	        
	        int maxPossible = 0; 
	        for(int j = 0; j < arr.length; ++j){
	            if(j != arr.length - 1){
	                if(arr[j] >= arr[maxPossible] && arr[j + 1] < arr[j]){
	                    maxPossible = j;
	                    continue; 
	                }
	            }
	            
	            if(j != 0){
	                if(arr[j] >= arr[maxPossible] && arr[j-1] < arr[j]){
	                    maxPossible = j;
	                    continue; 
	                }
	            }
	        }
	        
	        
	        System.out.println(maxPossible + 1);
	    }
	}
}