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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Debagnik Roy
 */
public class CF_677C {
    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;
        }
    }
    
    static FastReader fs;
    
    static void in(int a[]) {
        for (int i = 0; i < a.length; i++) {
            a[i] = fs.nextInt();
        }
    }
    
    static void in(long a[]) {
        for (int i = 0; i < a.length; i++) {
            a[i] = fs.nextLong();
        }
    }
    
    static void in(int a[][]) {
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a[0].length; j++) {
                a[i][j] = fs.nextInt();
            }
        }
    }
    
    static void sort(int a[]) {
        Arrays.sort(a);
    }
    
    static void sort(long a[]) {
        Arrays.sort(a);
    }
    
    static void sort(String a[]) {
        Arrays.sort(a);
    }
    
    class DSU {
        
        int rank[], parent[];        
        int n;        
        
        DSU(int size) {
            n = size;
            rank = new int[n];
            parent = new int[n];
            for (int i = 1; i <= n; i++) {
                parent[i] = i;
            }            
        }        
        
        int find(int x) {            
            if (parent[x] != x) {
                parent[x] = find(parent[x]);
            }            
            return parent[x];            
        }        
        
        void union(int x, int y) {            
            int xRoot = find(x), yRoot = find(y);            
            if (xRoot == yRoot) {
                return;
            }            
            
            if (rank[xRoot] < rank[yRoot]) {
                parent[xRoot] = yRoot;
            } else if (rank[yRoot] < rank[xRoot]) {
                parent[yRoot] = xRoot;
            } else {                
                parent[yRoot] = xRoot;                
                rank[xRoot] = rank[xRoot] + 1;                
            }            
            --n;
        }
    }
    public static void main(String[] args) {
        fs=new FastReader();
        int t=fs.nextInt();
        while(t-->0){
            int n=fs.nextInt();
            int a[]=new int[n];
            in(a);
            int max=a[0];
            for(int i=0;i<n;i++)
                max=Math.max(a[i],max);
            if(a[0]==max){
                if(a.length==1 || a[1]!=max){
                    System.out.println("1");
                    continue;
                }                    
            }
            if(a[n-1]==max){
                if(a.length==1 || a[n-2]!=max){
                    System.out.println(n);
                    continue;
                }                    
            }
            int flag=0;
            for(int i=1;i<n-1;i++){
                if(a[i]==max){
                    if(a[i-1]!=max || a[i+1]!=max){
                        System.out.println(i+1);
                        flag=1;
                        break;
                    }
                }
            }
            if(flag==0)
            System.out.println("-1");
        }
    }
}
