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

//package com.company;
import java.util.*;
public class Main {

//    static ArrayList<ArrayList<Integer>> graph = new ArrayList<ArrayList<Integer>>();
//    static List<Integer> a = new ArrayList<>();
//    static List<Integer> b = new ArrayList<>();
//    static List<Integer> c = new ArrayList<>();
//    static Map<Integer, Integer> map = new HashMap<>();
//    static Set<Integer> set = new HashSet<>();

    public static void main(String[] args) {
        var scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        for (int i = 0; i < t; i++) {
            int l = scanner.nextInt();
            List<Integer> nums = new ArrayList<>();
            int h = 0;
            int pos = -1;
            for (int x = 0; x < l; x++) {
                int num = scanner.nextInt();
                nums.add(num);
                if (num > h)
                    h = num;
            }
            for (int x = 0; x < l; x++) {
//                System.out.println(nums);
                if (x < l-1 && nums.get(x) == h && nums.get(x) > nums.get(x+1)) {
                    pos = x+1;
                    break;
                }
                else if (x > 0 && nums.get(x) == h && nums.get(x) > nums.get(x-1)) {
                    pos = x+1;
                    break;
                }

            }
            System.out.println(pos);
        }
    }
}
