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.io.*;
public class q3{
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int test = Integer.parseInt(br.readLine());
        while(test-->0){
            int n = Integer.parseInt(br.readLine());
            int arr[] = new int[n];
            StringTokenizer st = new StringTokenizer(br.readLine());
            int max = -1;
            int ind = -1;
            HashSet<Integer> set = new HashSet<>();
            for(int i=0;i<n;i++){
            
                arr[i] = Integer.parseInt(st.nextToken());
                max = Math.max(max,arr[i]);
                if(arr[i]==max && ((i-1>=0 && arr[i]>arr[i-1]) || (i+1<=n-1 && arr[i]>arr[i+1]))){
                    ind = i+1;
                }
                set.add(arr[i]);
            }
            if(set.size()==1){
                System.out.println("-1");
            }
            else{
                boolean flag = false;
                for(int i=1;i<n;i++){
                    if(arr[i]==max && arr[i]>arr[i-1]){
                        System.out.println(i+1);
                        flag = true;
                        break;
                    }
                }
                if(!flag){
                    for(int i=0;i<=n-2;i++){
                        if(arr[i]==max && arr[i]>arr[i+1]){
                            System.out.println(i+1);
                            flag = true;
                            break;
                        }
                    }
                }
                if(!flag){
                    System.out.println("-1");
                }
            }
            
        }
    }
}