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

//============================================================================
/*				"There is nothing that can take the pain away.
      But eventually you will find a way to live with it.
				There will be nightmares.
	  And every day when you wake up, it will be the first thing you think about.
				Until one day, it will be the second thing."
*/
// Author      : Murad
// Online Judge: Codeforces.cpp & Atcoder.cpp
// Description : Problem name
//============================================================================
/* Riven && Vladimir && Ekko */
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
    public static boolean Prime(long x){
        if(x==2)return true;
        else if(x%2==0 ||x<2)return false;
        for(int i=3;i*i<=x;i+=2){
            if(x%i==0)return false;
        }
        return true;
    }
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        int t=in.nextInt();
        while(t-->0){
            int n=in.nextInt();
            int ekko[]=new int[n];
            int mn=1000000001,mx=0;
            int minidx=-1,mxidx=-1;
            for(int i=0;i<n;i++)
                ekko[i]=in.nextInt();
            for(int i=0;i<n;i++)
            {
                if(ekko[i]>mx){
                    mx=ekko[i];
                    mxidx=i;
                }
                if(ekko[i]<mn){
                    mn=ekko[i];
                    minidx=i;
                }
            }
            if(mn==mx)out.println(-1);
            else out.println(mxidx+1);
            out.flush();
        }
    }
    static class Pair<C, I extends Number> implements Comparable<Pair<C, Number>> {
        long value;
        long idx;
        Pair(long v, long i)
        {
            value = v;
            idx = i;
        }

        @Override
        public int compareTo(Pair<C, Number> p) {
            return (int)(value - p.value);
        }
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public long[] readLongArray(int n) {
            long[] x = new long[n];
            for (int i = 0; i < n; i++) {
                x[i] = nextLong();
            }
            return x;
        }
        public int[] readIntArray(int n) {
            int[] x = new int[n];
            for (int i = 0; i < n; i++) {
                x[i] = nextInt();
            }
            return x;
        }
    }
    static class NumberTheory{
        public static long gcd(long a,long b){
            long c;
            while (a != 0) {
                c = a;
                a = b % a;
                b = c;
            }
            return b;
        }
    }
    //Relatively Prime :- if diffrence between two number is equal to 1
}