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.io.*;
import java.util.*;

public class B
{
    static int n;
    static int[] arr;
    static char[] s;
    public static void main(String[] args) throws IOException
    {
        Flash f = new Flash();
        int T = f.ni();
        for(int tc = 1; tc <= T; tc++){
            n = f.ni(); arr = new int[n+2];
            for(int i = 1; i <= n; i++) arr[i] = f.ni();
            sop(fn());
        }
    }
    
    static int fn()
    {
        boolean ok = true;
        for(int i = 2; i <= n; i++) if(arr[i] != arr[i-1]) ok = false;
        if(ok) return -1;
        
        int max = arr[0];
        for(int a : arr) max = Math.max(max, a);
        for(int i = 1; i <= n; i++){
            if(i == 1 && arr[i] == max && arr[i+1] < arr[i]) return i;
            else if(i != 1 && i != n && arr[i] == max && (arr[i] > arr[i-1] || arr[i] > arr[i+1])) return i;
            else if(i == n && arr[i] == max && arr[i-1] < arr[i]) return i;
        }
        
        return -5;
    }
    
    static void sort(int[] a){
        List<Integer> A = new ArrayList<>();
        for(int i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static int swap(int itself, int dummy){
        return itself;
    }
    
    static void sop(Object o){ System.out.println(o); }
    
    static void print(int[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        System.out.println(sb);
    }
    
    static class Flash
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        
        String next(){
            while(!st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){
                    e.printStackTrace();
                }
            }
            
            return st.nextToken();
        }
        
        String ns(){
            String s = new String();
            try{
                s = br.readLine().trim();
            }catch(IOException e){
                e.printStackTrace();
            }
            
            return s;
        }
        
        int ni(){
            return Integer.parseInt(next());
        }
        
        int[] arr(int n){
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = ni();
            return a;
        }

        long nl(){
            return Long.parseLong(next());
        }
        
        double nd(){
            return Double.parseDouble(next());
        }
    }
}