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.util.*;
import java.text.*;
/**
 *
 * @author shahd amer
 */
public class JavaApplication7 {
    public static void main(String[] args) {
        Scanner obj = new Scanner(System.in);
        int size = obj.nextInt();
        while(size-->0){
            int n = obj.nextInt();
            int[] arr = new int[n];
            int imax = n-1,r = 0;
            for (int i = 0; i < n; i++) arr[i] = obj.nextInt();
            int max = arr[n-1];
            for (int i = 0; i < arr.length-1; i++) {
                if(max < arr[i] || max <= arr[i] && arr[i+1] < arr[i]){
                    max = arr[i];
                    imax = i; }
                else if(max <= arr[i] && i != 0 && arr[i-1] < arr[i]){
                    max = arr[i];
                    imax = i;}
                if(arr[i] != arr[i+1])
                    r++;}
            if(r >= 1)
            System.out.println(imax+1 );
            else
            System.out.println(-1);

    }
}
}