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.util.*;
import java.io.*;
public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.valueOf(reader.readLine());
        while((t--) != 0) {
            int n = Integer.valueOf(reader.readLine());
            int[] a = new int[n];
            String[] info = reader.readLine().split(" ");
            int max = 0;
            for(int i=0; i<n; i++) {
                a[i] = Integer.valueOf(info[i]);
                max = Math.max(max, a[i]);
            }
            int idx = -1;
            for(int i=0; i<n; i++) {
                if(a[i] != max) {
                    continue;
                }
                if(i-1>=0 && a[i-1]!=max) {
                    idx = i+1;
                }
                if(i+1<n && a[i+1]!=max) {
                    idx = i+1;
                }
            }
            System.out.println(idx);
        }
    }
}