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.Arrays;
import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            int t = scanner.nextInt();
            int[] a = new int[t];
            int max = 0;
            int answer = 1;
            for (int j = 0; j < t; j++) {
                a[j] = scanner.nextInt();
                if (j == 0) {
                    max = a[j];
                    continue;
                }
                if (a[j] > max) {
                    max = a[j] + j;
                    answer = j + 1;
                } else if (a[j] < max) {
                    max += 1;
                } else {
                    max = a[j] + j;
                    answer = j + 1;
                }
            }
            Arrays.sort(a);
            if (a[0] == a[t - 1]) {
                System.out.println(-1);
            } else {
                System.out.println(answer);
            }
        }
    }
}