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.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class A {

    //************************Main Code*****************************//

    public static void main(String args[]) throws IOException{
        FastScanner s=new FastScanner();
        int tt=s.nextInt();
        while(tt-->0) {
        	int n=s.nextInt();
        	int a[]=s.readArray(n);
        	int x=a[0],f=0;
        	for(int i=0;i<n;i++) {
        		if(a[i]!=x) {
        			f=1;
        		}
        	}
        	if(f==0) {
        		System.out.println(-1);
        	}else {
        		int m=Integer.MIN_VALUE,ans=0;
        		for(int i=0;i<n;i++) {
        			if(m<a[i]) {
        				m=a[i];ans=i+1;
        			}
        		}
        		System.out.println(ans);
        	}
        }
    }


    //************************Fast Scanner*****************************//

    static class FastScanner{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

        String next() throws IOException {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
        }
        int nextInt() throws IOException {return Integer.parseInt( next() );}
        long nextLong() throws IOException{ return Long.parseLong( next() ); }
        double nextDouble() throws IOException {return Double.parseDouble( next() ); }
        int [] readArray(int n) throws IOException {int a[]=new int[n];for(int i=0;i<n;i++)a[i]=nextInt();return a;}

    }

    //************************Functions*****************************//

    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);}
    static void print(int arr[]) {String ans="";for(int i=0;i<arr.length;i++)ans+=(""+arr[i]+" ");System.out.println(ans);}
    static void print(ArrayList<Integer> a) {String ans="";for(int i=0;i<a.get(i);i++)ans+=(""+a.get(i)+" ");System.out.println(ans);}

    //************************Functions*****************************//

    static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
    static void debug(int arr[]) {String ans="";for(int i=0;i<arr.length;i++)ans+=(""+arr[i]+" ");System.out.println(ans);}
}