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

public class MyClass {
    public static void main(String[] args) throws IOException {
//        BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(System.in));
        Scanner scanner=new Scanner(System.in);
        PrintWriter printWriter=new PrintWriter(System.out);
        int t=scanner.nextInt();
//        String s=bufferedReader.readLine();
//        int t=Integer.valueOf(s.trim());
        while(t-->0) {

            int n=scanner.nextInt();
            int[] a=new int[n];
            int ma=-1;

            for(int i=0;i<n;i++) {

                a[i]=scanner.nextInt();
                ma=Math.max(ma, a[i]);
            }

            int dom=-1;

            for(int i=0;i<n;i++) {

                if(a[i]!=ma)
                    continue;
                if((i>0) && (ma!=a[i-1]))
                    dom=i+1;
                if(((i+1)<n) && (ma!=a[i+1]))
                    dom=i+1;
            }
            printWriter.println(dom);
        }
//        bufferedReader.close();
        printWriter.close();
    }
}