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.lang.*;
import java.io.*;
 
/* Name of the class has to be "Main" only if the class is public. */
 public class Codechef
{
    static FastReader sc = new FastReader();
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		
		int t = sc.nextInt() ;
		
		while(t>0) {
		    int n=sc.nextInt();
		    long arr[]=new long[n];
		    arr[0]=sc.nextInt();
		    long max=arr[0];
		    long pos=0;
		    long count=1;
		    boolean b=true;
		    for(int i=1;i<n;i++)
		    {
		        arr[i]=sc.nextInt();
		        if(max<arr[i])
		        {
		            max=arr[i];
		            pos=i;
		        }
		        if(arr[i]==arr[i-1])
		        {
		            count=count+1;
		        }
		    }
		  
		    if(count==n)
		    {
		        System.out.println("-1");
		    }
		    else if(pos==0)
		    {
		        if(max>arr[1])
		        {
		           
		            System.out.println("1");
		        }
		         else{
		    
		        long left=pos;
		     
		       while(true)
		       {
		      
		           if(arr[(int)left+1]<arr[(int)left] )
		           {
		               System.out.println(left+1);

		               break;
		           }
		           else{
		               left=left+1;
		            
		           }
		       }
		    }
		    }
		    else if(pos==n-1)
		    {
		        if(max>arr[n-2])
		        {
		            System.out.println(n);
		        }
		        else{
		    
		    
		        long right=pos;
		       while(true)
		       {
		           if (arr[(int)right]>arr[(int)right-1])
		           {
		               System.out.println(right+1);
		               break;
		           }
		           else{
		             
		               right=right-1;
		           }
		       }
		    }
		    }
		    else 
		    {
		                         long left=pos;
		        		        long right=pos;
		       while(true)
		       {
		           if (arr[(int)right]>arr[(int)right-1] ||arr[(int)left]>arr[(int)left+1])
		           {
		               System.out.println(right+1);
		               break;
		           }
		           else{
		             
		               right=pos-1;
		               left=left+1;
		           }
		       }
		    }
		   
			t--;
		}
	}
	
	
	
	//	FAST I/O
	static class FastReader {
        BufferedReader br;
        StringTokenizer st;
        
        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt() { return Integer.parseInt(next()); }
 
        long nextLong() { return Long.parseLong(next()); }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
	}
	
	
}
 
 
 
 
