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.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        FastScanner f = new FastScanner();
        int t = f.nextInt();
        for(int tt=0;tt<t;tt++)
        {
            int n = f.nextInt();
            int[] a = f.readArray(n);
            int max =0,in=0;
            for(int i=0;i<n;i++)
            {
                if(a[i] > max)
                {
                    max = a[i];
                    in = i;
                }
                else if(max == a[i] && i < n-1)
                {
                    if(a[i] > a[i+1] || a[i] > a[i-1])
                    {
                        in = i;
                    }
                }
            }
            if((in>0 && in<n-1) && (a[in - 1] < a[in] || a[in] > a[in + 1]) )
            {
                    System.out.println(in+1);
            }
            else if(in==0 && (max > a[in+1]))
            {
                    System.out.println(in+1);
            }
            else if(in==n-1 && (max > a[in-1]))
            {
                    System.out.println(in+1);
            }
            else
                System.out.println(-1);

        }
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
