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.util.StringTokenizer;

public class DominantPiranha
{
    public static void main(String[] args)
    {
        FastReader sc = new FastReader();
        int t = sc.nextInt();
        while(t-->0) {
            int n = sc.nextInt();
            long a[] = new long[n];
            long max = Long.MIN_VALUE;
            int index = -1;
            boolean alsame = true;
            for (int i = 0; i < n; i++) {
                a[i] = sc.nextInt();

                if(i>0&&alsame && a[i]!=a[i-1])
                {
                    alsame = false;
                }

                if (a[i] > max)
                    max = a[i];
            }
            for (int i = 0; i < n; i++)
                if(a[i] == max ) {
                    index = i;
                break;
                }
            if(alsame)
                System.out.println(-1);
            else
                {
                    if((index-1 >=0 && a[index-1]<a[index]) || (index+1)<n && a[index+1] < a[index])
                        System.out.println(index + 1);
                else
                    {
                    for(int i = index; i < n -1;)
                    {

                        if(a[i] == a[i+1])
                        {i++;
                        index++;}
                        else
                            break;

                    }

                    System.out.println(index + 1);
                }
                }
            }




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

}
