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 Main {
    public static long solve(int[] a, int n) {
        long r = 0;
        boolean f = false;
        int m = a[0];
        for(int i=1; i<n; i++){
            m=Math.max(m,a[i]);
            if(!f&&a[i]!=a[i-1]){
                f=true;
            }
        }
        if(!f){
            return -1;
        }
        for(int i=0; i<n; i++){
                if(a[i]==m&&((i>0&&a[i-1]!=m)||((i<n-1&&a[i+1]!=m)))){
                return i+1;
            }
        }
        return -1;
        }
    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int t = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.
        for (int i = 1; i <= t; ++i) {
            int n = in.nextInt();
            int [] a = new int[n];
            for(int j=0; j<n; j++){
                a[j]=in.nextInt();
            }
            System.out.println(solve(a,n));
        }
     }
}
