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

public class Main {

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

    public static int getMax(int[] inputArray){
        int maxValue = inputArray[0];
        for(int i=1;i < inputArray.length;i++){
            if(inputArray[i] > maxValue){
                maxValue = inputArray[i];
            }
        }
        return maxValue;
    }

    public static void solvePiranha(FastReader fastReader) {
        int n = fastReader.nextInt();
        int[] ints = new int[n];
        for(int i=0;i<n;i++) {
            ints[i] = fastReader.nextInt();
        }

        boolean isAllSame = true;
        for(int i=1;i<n;i++) {
            if(ints[i] != ints[0]) {
                isAllSame = false;
                break;
            }
        }

        if(isAllSame) {
            System.out.println(-1);
            return;
        }

        int maxx = getMax(ints);

        for(int i=0;i<n;i++) {
            if(ints[i] == maxx) {
                if(i-1>=0 && ints[i-1] < maxx) {
                    System.out.println(i+1);
                    return;
                }
                if(i+1<n && ints[i+1] < maxx) {
                    System.out.println(i+1);
                    return;
                }
            }
        }
    }

    public static void main(String[] args) {
        //linkList();
        FastReader fastReader = new FastReader();
        int tests = fastReader.nextInt();
        while (tests > 0) {
            solvePiranha(fastReader);
            tests--;
        }
    }
}
