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.io.PrintWriter;
import java.util.StringTokenizer;

public class C {

    public static void main(String[] args) {
        int T = sc.nextInt();
        for (int t = 0; t < T; t++) {
            solve();
        }
        out.close();
    }

    private static void solve() {
        int n = sc.nextInt();
        long[] arr = sc.readArray(n);
        long max = Integer.MIN_VALUE;
        int index = -1;
        for(int i = 1;i<n-1;i++) {
            if(arr[i]>max) {
                if(arr[i]>arr[i+1] || arr[i]>arr[i-1]) {
                    max = arr[i];
                    index = i+1;
                }
            }
        }
        if(arr[0]>max) {
            if(arr[0]>arr[1]) {
                max = arr[0];
                index = 1;
            }
        }
        
        if(arr[n-1]>max) {
            if(arr[n-1]>arr[n-2]) {
                max = arr[n-1];
                index = n;
            }
        }
        out.println(index);
    }

    private static final FastScanner sc = new FastScanner();
    private static final PrintWriter out = new PrintWriter(System.out);

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

        long[] readArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
