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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;


public class Main {
    static int i,j,k,n,m,t,x,y,max=1000000;
    static long ans,a,b,c,d,e,l,r,sum,mi,ma,mod=1000000007 ;
    static String str;
    static char ch;
    static FastScanner fs = new FastScanner();

    public static void main(String[] args) {

        t = fs.nextInt();

        PrintWriter out = new PrintWriter(System.out);

        while (t-- > 0) {
            n = fs.nextInt();

            int [] arr = new int[n+5];

            for(i=0;i<n;i++){
                arr[i]= fs.nextInt();
            }
            int temp = 0, in =-1, f =0;

            for(i=1;i<n;i++){
                if(arr[i]!=arr[i-1])
                    f=1;
            }

            if(f==0)
                out.println(-1);
            else{
                for(i=0;i<n;i++){
                    if(temp<arr[i]){
                        temp = arr[i];
                        in = i;
                    }
                }

                if(in ==0)
                {
                    for(i=1;i<n;i++){
                        if(arr[i]!=temp)
                            break;
                    }
                    in = i-1;
                }
                out.println(in+1);
            }

        }
        out.close();
    }




    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }

    //To be used with priority queues.
    static class Pair implements Comparable<Pair> {
        long first, second;
        long len;
        public Pair(long first, long second) {
            this.first=first;
            this.second=second;
            this.len=second-first+1;
        }

        public int compareTo(Pair o) {
            if (len!=o.len) {
                return -Long.compare(len, o.len);
            }
            else {
                return Long.compare(first, o.first);
            }
        }

    }

    static void sort(int[] a) {
        ArrayList<Integer> l=new ArrayList<>();
        for (int i:a) l.add(i);
        Collections.sort(l);
        for (int i=0; i<a.length; i++) a[i]=l.get(i);
    }

}