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.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int tcase = in.nextInt();
        while(tcase-->0){
            List<Integer> list = new ArrayList<>();
            int count = in.nextInt();
            for(int i=0 ; i<count ; i++)
                list.add(in.nextInt());
            if(Collections.max(list).equals(Collections.min(list))) System.out.println(-1);
            else{
                int h=0;
                int max = Collections.max(list);
                int ans=-1;
                for(int i=1 ; i<list.size()-2 ; i++){
                    if(list.get(i)==max && (list.get(i-1)!=max || list.get(i+1)!=max)) {
                        ans= i+1;
                        h++;
                        break;
                    }
                }
                if(h==0){
                    if(list.get(0).equals(max) && list.get(1)!=max) ans=1;
                    if(list.get(count-1).equals(max) && list.get(count-2)!=max) ans=count;
                }
                System.out.println(ans);
            }
        }
    }
}