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

//package com.company;
import java.util.*;


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int t = scanner.nextInt();
        for(int i1 = 0; i1<t;i1++){
            int k = scanner.nextInt();
            int[] array = new int[k];
            readArray(array);
            int max = max(array);
            int num = 0;
            for(int i = 1;i< array.length-1;i++){
                if(array[i]==max-1){
                    num = i+1;
                    break;
                }
            }
            if(num==0){
                System.out.println(-1);
            }else {
                System.out.println(num);
            }
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static int max(int[] array ){
        int min = Integer.MIN_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]>min){
                min = array[i];
            }
        }
        return min;
    }
    private static int min(int[] array ){
        int min = Integer.MAX_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]<min){
                min = array[i];
            }
        }
        return min;
    }
    private static void readArray(int[] array){
        for(int i = 0;i< array.length;i++){
            array[i] = scanner.nextInt();
        }
    }
    private static void printarray(int[] array){
        for(int i = 0; i< array.length;i++){
            System.out.print(array[i]);
        }
    }
    private static int gcd(int a , int b){
        int k = 0;
        for(int i  =1 ;i<Math.max(a,b);i++){
            if(a%i==0 && b%i==0){
                k = i;
            }
        }
        return k;
    }
}