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.*;
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
public class Main {
public static void main(String[] args) {
    //solution start :-)
  Scanner sc = new Scanner(System.in);
		 int t = sc.nextInt();
		 while(t-->0) {
			 ArrayList<Integer> al = new ArrayList<>();
			 int n = sc.nextInt();
			 int a[] = new int[n];
			 int max = 0;
			 Set<Integer> s = new HashSet<>();
			 for(int i=0;i<n;i++) {
				 a[i] = sc.nextInt();
				 s.add(a[i]);
				 if(a[i]>max) max = a[i];
			 }
			 if(s.size()==1) System.out.println("-1");
			 else{
				 if(a[0]==max){
				     if(a[0]!=a[1])  System.out.println("1");
				     else{
				         int ind=0;
				         for(int i=1;i<(n-1);i++) {  
				             if(a[i]==max && a[i+1]!=max) {  
				                 ind =i;
				                 break;
				             }
				         }
				         if(ind==0)   System.out.println(n);
				         else   System.out.println(ind+1);
				     }
				 }  
				 else{   
				     int ind = 0;
				     for(int i=0;i<n;i++){   
				         if(a[i] == max){ 
				             ind =i;
				             break;
				         }
				     }
				     System.out.println(ind+1);
				 }
			 }
			 
			 
			 
			 
			 
		 }
		
    //	solution end \(^-^)/
    //		        |
    //		       / \
}}