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

/* package codechef; // don't place package name! */
import java.math.*;
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 C_Dominant_Piranha

{
     FastReader s;

    
	public static void main (String[] args) throws java.lang.Exception
	{
	
		new C_Dominant_Piranha().run();

	}
	void run()
	{
	    s = new FastReader();
	    solve();
	}
	 
	void solve()
	{
	    for(int T = s.nextInt();T > 0;T--)
	    start();
	}
	
	void start()
	{
	    	
		  
		          
             //  for taking innput of array of length "len"
                                      int len = s.nextInt();

            long [] arr = new long[len];

                  arr = longArr(len);

                  long max = -1;
                  int l = -1;
                  for(int i = 0; i<len; i++)
                  {
                     if(arr[i]>max)
                     {
                         max = arr[i];
                         l = i;
                     }
                     else if(arr[i] == max)
                     {
                         if(l-1>=0)
                         {
                             if(arr[l-1] == arr[l])
                             {
                                 l = i;
                             }
                         }
                        else if(l<len-1)
                         {
                             if(arr[l] == arr[l+1])
                             {
                                 l = i;
                             }
                         }

                     }
                  }
               int i = 0;
                  if(l-1>=0)
                  {
                      if(arr[l-1] == arr[l])
                      {
                          i++;
                      }
                  }
                  else i++;

                  if(l<len-1)
                  {
                      if(arr[l] == arr[l+1])
                      {
                        i++;
                      }
                  }
                  else i++;
                  if(i == 2)
                  {
                      System.out.println(-1);
                  }
                  else{
                      System.out.println(l);
                  }

                
                   
                
             
		       	     
		       //  for printing ar array of size "len"
            //   StringBuffer sb = new StringBuffer(); 
            //   for (int i = 0; i < len; i++) 
           //   sb.append(arr[i] + " "); 
          //
          //   System.out.println(sb);  
		     
		
	}
	

    //long array input
	public long [] longArr(int len)
    {
        // long arr input
            long [] arr = new long[len];
            String [] strs =  s.nextLine().trim().split("\\s+");
            for(int i =0; i<len; i++)
            {
                arr[i] = Long.parseLong(strs[i]);
               
            }
            return arr;
    }
    // int arr input
    public int [] intArr(int len)
    {
        // long arr input
            int [] arr = new int[len];
            String [] strs =  s.nextLine().trim().split("\\s+");
            for(int i =0; i<len; i++)
            {
                arr[i] = Integer.parseInt(strs[i]);
               
            }
            return arr;
    }
	  
  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;
        }
    }

	
    
}
