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.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class DominantPiranha {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        scanner.nextLine();
        while(t!=0){
            int largest= 0;
            int size = scanner.nextInt();
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = scanner.nextInt();
                if(arr[i]>largest){
                    largest = arr[i];
                }
            }
            solution(arr, size,largest);
            t--;
        }
    }
    public static void solution(int[] arr, int size, int largest){
        ArrayList<Integer> indexes = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            if(arr[i]==largest){
                indexes.add(i);
            }
        }
        //System.out.println(Arrays.toString(indexes.toArray()));
        int ans = -1;
        if(indexes.size()==1){
            ans = indexes.get(0)+1;
        }
        else{
            for (int i = 0; i < indexes.size(); i++) {

                if(indexes.get(i)==0) {

                    if (arr[indexes.get(i)] > arr[indexes.get(i) + 1]) {
                        ans= indexes.get(i)+1;
                        break;
                    }
                }
                else if (size-1==indexes.get(i)){

                    if (arr[indexes.get(i)]>arr[indexes.get(i)-1]){
                        ans= indexes.get(i)+1;
                        break;
                    }
                }
                else{
            
                    if( (arr[indexes.get(i)]>arr[indexes.get(i)+1]) ||  (arr[indexes.get(i)]>arr[indexes.get(i)-1]) ){

                        ans= indexes.get(i)+1;
                        break;
                    }
                }
            }
        }

        System.out.println(ans);
        }

    }

