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.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;


public class Main {

    private static final Scanner scanner = new Scanner(System.in);

    public static void main(final String[] args) throws Exception {

        int tests = scanner.nextInt();
        for(int i=0; i<tests;i++) {
            int test1 = scanner.nextInt();
            int [] test2 = new int[test1];
            int max = Integer.MIN_VALUE;
            int position=0;
            for(int t= 0; t<test1; t++) {
                test2[t] = scanner.nextInt();
                if(test2[t] > max) {
                    max = test2[t];
                    position = t+1;
                }
            }
            int count= 0;
            for(int t= 1; t<test2.length; t++) {
               if(test2[t] == test2[t-1]) {
                   count++;
               }
            }

            if(count == test2.length-1) {
                System.out.println(-1);
            }else {
                System.out.println(position);
            }


        }
    }


}
