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 Solution {
    public static void main(String args[]) {
     Scanner sc=new Scanner(System.in);
     int t=sc.nextInt();
     while(t-->0)
     {
         int n=sc.nextInt();
         int[] arr=new int[n];
         int max=0;
         for(int i=0;i<n;i++){
             arr[i]=sc.nextInt();
             max=Math.max(max,arr[i]);
         }
         int l=0;
         int r=n-1;
         boolean change=false;
         boolean change1=false;
         for(int i=l;i<n-1;i++){
             if(arr[i]==max && arr[i+1]<max){
                 l=i;
                 change=true;
                 break;
             }
         }
         for(int i=r;i>0;i--){
             if(arr[i]==max && arr[i-1]<max){
                 r=i;
                 change1=true;
                 break;
             }
         }
         if(change==true || change1==true ){
             int ans=0;
            if(change){
                ans=l;
            }
            if(change1){
                ans=r;
            }
             System.out.println(ans+1);
         }else{
             System.out.println(-1);
         }
         
     }
    }
}