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

//JAI BAJRANGBALI                                                                                                                                               
import java.util.*;
import java.io.*;
import java.math.BigInteger;
//class Main    //AtCoder
//class Solution // Codechef
public class Solution //Codeforces
{
    public final static int d = 256;
    static int MOD = 1000000007;
    static final float EPSILON = (float)0.01;
    static final double PI = Math.PI;
    private static BufferedReader in = new BufferedReader (new InputStreamReader (System.in));
    private static BufferedWriter out = new BufferedWriter (new OutputStreamWriter (System.out));
    static class Graph {
        int V;
        LinkedList<Integer>[] adjListArray;
        Graph(int V) {
            this.V = V;
            adjListArray = new LinkedList[V];
            for(int i = 0; i < V ; i++){
                adjListArray[i] = new LinkedList<Integer>();
            }
        }
        void addEdge( int src, int dest) {
            adjListArray[src].add(dest);
            adjListArray[dest].add(src);
        }

        void DFSUtil(int v, boolean[] visited) {
            visited[v] = true;
            for (int x : adjListArray[v]) {
                if(!visited[x]) DFSUtil(x,visited);
            }

        }
        int connectedComponents() {
            boolean[] visited = new boolean[V];
            int cnt = 0;
            for(int v = 0; v < V; ++v) {
                if(!visited[v] && adjListArray[v].size() != 0) {
                    DFSUtil(v,visited);
                    cnt++;
                }
            }
            return cnt;
        }
    }
    static class SegmentTree{
        int arr[] , st[];
        int maxSize , N;
        SegmentTree(int arr[] , int N){
            this.arr = arr;
            this.N = N;
            int x = (int) (Math.ceil(Math.log(N) / Math.log(2)));
            this.maxSize = 2 * (int) Math.pow(2, x) - 1;
            this.st = new int[maxSize];
            constructST(0 , N-1 , 0);
        }
        void constructST(int start , int end , int ind)
        {
            constructSTUtil(start , end , ind);
        }
        int constructSTUtil(int start , int end , int ind)
        {

            if(start == end){
                st[ind] = arr[start];
                return st[ind];
            }
            else{
                int mid = start + (end - start)/2;
                st[ind] = constructSTUtil(start , mid , (2*ind) + 1) ^ constructSTUtil(mid+1 , end , (2*ind) + 2);
                return st[ind];
            }
        }
        int findXorInRange(int start , int end , int qstart , int qend , int index)
        {
            if(qstart <= start && qend >= end)
            {
                return st[index];
            }
            else if(qstart > end || qend < start || end < start){
                return 0;
            }
            else{
                int mid = start + (end - start)/2;
                return findXorInRange(start , mid , qstart , qend , (2*index) + 1) ^ findXorInRange(mid+1 , end , qstart , qend , (2*index) + 2);
            }
        }
    }
    static class FastReader    {
        BufferedReader br;
        StringTokenizer st;
        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                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());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static class Cell{
        int X , Y , dis;
        Cell(int x , int y , int di){
            X = x;
            Y = y;
            dis = di;
        }
    }
    static boolean isValid(int x , int y , int N , int M){
        return ((x >= 0 && x < N) &&(y >= 0 && y < M));
    }
    static int searchRabinKarp(String pat, String txt)    {
        int M = pat.length();
        int N = txt.length();
        int i, j;
        int p = 0; // hash value for pattern 
        int t = 0; // hash value for txt 
        int h = 1 , cnt = 0;
        int q = 3355439;
        for (i = 0; i < M-1; i++)
            h = (h*d)%q;
        for (i = 0; i < M; i++)
        {
            p = (d*p + pat.charAt(i))%q;
            t = (d*t + txt.charAt(i))%q;
        }
        for (i = 0; i <= N - M; i++)
        {
            if ( p == t )
            {
                for (j = 0; j < M; j++)
                {
                    if (txt.charAt(i+j) != pat.charAt(j))
                        break;
                }
                if (j == M)
                {//System.out.println("Pattern found at index " + i);
                    cnt++;
                }
            }
            if ( i < N-M )
            {
                t = (d*(t - txt.charAt(i)*h) + txt.charAt(i+M))%q;
                if (t < 0)
                    t = (t + q);
            }
        }
        return cnt;
    }
    static long gcd(long bigger , long smaller)    {
        if (smaller == 0)
            return bigger;
        return gcd(smaller, bigger % smaller);
    }
    static long lcm(long a, long b)
    {
        return (a*b)/gcd(a, b);
    }
    static long sumOfArray(long arr[])    {
        long sum = 0;
        for(int i = 0 ; i < arr.length ; i++)
            sum += arr[i];
        return sum;
    }
    static boolean isPrime(long n) {
        if(n == 2)
            return true;
        else if(n == 1)
            return false;
        else if (n%2==0)
            return false;
        for(long i=3;i<=Math.sqrt(n);i+=2) {
            if(n%i==0)
                return false;
        }
        return true;
    }
    static long modularExpo(long x, long y, long p)    {
        long res = 1;
        x = x % p;
        if (x == 0) return 0;
        while (y > 0)
        {
            if((y & 1)==1)
                res = (res * x) % p;
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }
    static long countDigit(long n)
    {
        return (long)Math.floor(Math.log10(n) + 1);
    }
    static long sumOfDigits(long n)    {
        long sum;
        for (sum = 0; n > 0; sum += n % 10,n /= 10);
        return sum;
    }
    static boolean isPalindrome(String str)    {
        int i = 0, j = str.length() - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
        return true;
    }
    static void sop(Object o){System.out.print(o);}
    static void sopln(Object o){System.out.println(o);}
    static class Int implements Comparator<Int>{
        int pos ,op , val;
        Int(int a ,int o,int c){
            pos=a;
            op=o;
            val=c;
        }
        @Override
        public int compare(Int anInt, Int t1) {
            return anInt.val-t1.val;
        }
    }
    static int setBitNumber(int n)
    {
        if (n == 0)
            return 0;

        int msb = 0;
        n = n / 2;

        while (n != 0) {
            n = n / 2;
            msb++;
        }

        return (1 << msb);
    }

    public static void main(String args[])
    {
        try{
            Scanner scN = new Scanner(System.in);
            FastReader sc=new FastReader();
            int T = sc.nextInt();
            while(T-- > 0)
            {
                try {
                    int n=sc.nextInt();
                    int arr[] = new int[n];
                    for(int i = 0 ;i<n;i++)
                        arr[i] =sc.nextInt();
                    int ar[] = new int[arr.length];
                    for(int i = 0 ; i < ar.length ; i++)
                        ar[i]=arr[i];
                    Arrays.sort(arr);
                    if(arr[0] == arr[n-1]){
                        sopln("-1");
                    }
                    else{
                        int max = arr[n-1],ans=-1;
                        for(int i = 0 ; i < n ;i++){
                            if(max==ar[i]){
                                ans=i;
                                break;
                            }
                        }
                        sopln(ans+1);
                    }
                }catch(Exception e){
                    sop("HEHE"+e);
                }
                //sopln(N+" "+str);
            }
            try{
                out.flush();
            }catch(Exception e){
                System.out.print(e);
            };
        }
        catch(Exception e){
            System.out.print(e);
        }
    }
    public static int uniquePath(int o , int x , int y ,int m , int n , Integer arr[][] , Integer obstacleGrid[][])
    {
        if((x >= 0 && x < m) && (y >= 0 && y < n) && obstacleGrid[x][y] != o)
        {
            if(x == m-1 && y == n-1)
                return 1;
            else if(arr[x][y] == null){
                arr[x][y] = uniquePath(o , x ,y+1 , m , n , arr , obstacleGrid) + uniquePath(o ,x+1 , y , m , n , arr , obstacleGrid);
                return arr[x][y];
            }
            else{
                return arr[x][y];
            }
        }
        else{
            //System.out.println(x+" "+y);
            return 0;
        }
    }
}