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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
           
                int t=in.nextInt();
                while(t-- >0)
                {
                    int n=in.nextInt();
                    long ar[]=new long[n];
                    int pos=-1;
                   
                    long big=-1;
                    boolean e=false;
                    for(int x=0; x<n;x++)
                    {
                        ar[x]=in.nextLong();
                        if(ar[x] > big)
                        {
                            big=ar[x];
                        }
                        if(e== false && x !=0)
                        {
                            if( ar[x] !=ar[x-1])
                            {
                                e=true;
                            }
                        }
                        
                    }
                    if(e== true)
                    {
                    boolean ssmall=false;
                    boolean sbig=false;
                    for(int x=0;x<n;x++)
                    {
                        if(ssmall ==false && ar[x] < big)
                        {
                            ssmall=true;
                            if(sbig==true)
                            {
                                out.println(x);
                                break;
                            }
                        }
                        else if(ssmall ==true && ar[x] ==big)
                        {
                            out.println(x+1);
                            break;
                        }
                        else if(sbig== false && ar[x] ==big)
                        {
                            sbig=true;
                        }
                    }
                    }
                    else{
                        out.println("-1");
                    }
                   
                }
        }
        

    }
    

    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());
        }


    }
}

