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 test=0; test<tests; test++){

            int num_fishes = s.nextInt();
            int[] all_fishes = new int[num_fishes];

            int largest = 0;
            int largest_count = 0;
            int small_pos = 0;
            boolean answer_found = false;

            for(int i=0; i<num_fishes; i++){
                int input_size = s.nextInt();
                 all_fishes[i] = input_size;
                
                if(input_size > largest){
                    largest = input_size;
                    largest_count = 1;
                }

                else if(input_size == largest){
                    largest_count += 1;
                }

                else if(input_size < largest){
                    small_pos = i;
                }

            }

            if(largest_count == num_fishes){
                System.out.println(-1);
            }

            else{
                for(int j=small_pos; j<num_fishes; j++){
                    if(all_fishes[j] == largest){
                        System.out.println(j+1);
                        answer_found = true;
                        break; 
                    }
                }

                if(answer_found == false){
                    for(int jj=small_pos; jj>=0; jj--){
                        if(all_fishes[jj] == largest){
                            System.out.println(jj+1);
                            break;
                        }
                    }
                }

            }
        }
        
    } 
}