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.Scanner;

public class DominantPiranha {
    private static Scanner scanner=new Scanner(System.in);
    public static void main(String[] args){
        int test=scanner.nextInt();
        for(int t=0;t<test;t++){
            int size=scanner.nextInt();
            int[] arr=new int[size];
            boolean zeroHit=false;
            int maxNum=0;
            int maxIndex=0;
            int sameHit=0;
            int hit=0;
            for(int i=0;i<size;i++){
                arr[i]=scanner.nextInt();
                if(!zeroHit){
                    zeroHit=true;
                    maxNum=arr[i];
                    maxIndex=i;
                }else if(maxNum==arr[i]){
                    if(arr[maxIndex]==arr[i]) {
                        maxIndex = i;
                        sameHit++;
                    }
                }else if(maxNum>arr[i]){
                    maxNum++;
                    hit++;
                }else if(arr[i]>maxNum){
                    maxNum=arr[i];
                    maxNum+=i;
                    maxIndex=i;
                    hit++;
                }
            }
            if(hit>0){
                if((hit+sameHit)==(size-1)){
                    System.out.println(maxIndex+1);
                }else{
                    System.out.println(-1);
                }
            }else{
                System.out.println(-1);
            }
        }
    }
}
