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


public class DominantPiranha {
    public static void main(String[] args) throws FileNotFoundException {
        InputStream is = System.getProperty("ONLINE_JUDGE") != null ? System.in :
                new FileInputStream(new File("./src/in.txt"));
        MyScanner sc = new MyScanner(is);
        out = new PrintWriter(new BufferedOutputStream(System.out));
        int t = sc.nextInt();
        while(t-- > 0) {
            int n = sc.nextInt();
            int a[] = new int[n];
            for(int i= 0; i < n; i++) {
                a[i] = sc.nextInt();
            }
            System.out.println(compute(a));
        }

        out.close();
    }

    static int compute(int[] a) {
        int max = 0;
        for(int i : a) {
            max = Math.max(i, max);
        }

        for(int i =0; i < a.length; i++) {
            if(a[i] == max) {
                if(i > 0 && a[i-1] < a[i]) {
                    return i;
                } else if(i < a.length -1 && a[i] > a[i + 1]) {
                    return i;
                }
            }
        }

        return -1;
    }


    //-----------PrintWriter for faster output---------------------------------
    private static PrintWriter out;

    static void printArray(int[] a) {
        for (int i = 0; i < a.length; i++) {
            if (i == a.length - 1) {
                out.println(a[i]);
            } else {
                out.println(a[i] + " ");
            }
        }
    }

    //-----------MyScanner class for faster input----------
    private static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        private MyScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(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;
        }

    }
    //--------------------------------------------------------
}
