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

// Working program with FastReader 
import java.io.*;
import java.util.*;
import java.lang.*;
 
public class Main 
{ 
    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; 
        } 
    } 
  
    //****************************************************************************************************
    //****************************************************************************************************
    //****************************************************************************************************
 
    public static void main(String[] args) 
    { 
        FastReader s =new FastReader(); 
        int tests = s.nextInt();
 
        for(int i=0; i<tests; i++){

            int dom = -1;
            int fish_size1 = 0; 
            int fish_size2 = 0;
            int fish_size=0;
            int max_size = 0;
            int num_fishes = s.nextInt();

            fish_size1 = s.nextInt();
            fish_size2 = s.nextInt();

            if(fish_size1>fish_size2){
                dom = 0;
                max_size = fish_size1 +1;
            }
            else if(fish_size1 < fish_size2){
                dom = 1;
                max_size = fish_size2 +1;
            }
            else if(fish_size1 == fish_size2){
                dom = -1;
                max_size = fish_size2;
            }

            for(int j=2; j<num_fishes;j++){
                fish_size = s.nextInt();

                if(fish_size > max_size){
                    dom = j;
                    max_size = fish_size +1;
                }

                else if(fish_size < max_size && j ==2 && dom == -1){
                    max_size = max_size+1;
                    dom =1;
                }

                else if(fish_size < max_size){
                    max_size = max_size+1;
                }

                else if(fish_size == max_size){
                    dom = j;
                }


            }
            if(dom>=0){
                dom+=1;
            }
            System.out.println(dom);
            
        }
        
    } 
}