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

public class pb2 {

	public static void main(String[] args) {
		Scanner obj = new Scanner(System.in);
		int t = obj.nextInt();		
		for(int i = 0;i<t;i++) {
			int n = obj.nextInt();
			int[]array = new int[n];
			int ans = -1;
			int max = Integer.MIN_VALUE;
			HashSet<Integer>h = new HashSet<>();
			for(int j = 0;j<n;j++) {
				array[j] = obj.nextInt();
				h.add(array[j]);
				if(max<array[j] && array[j]!=max ) {
					ans = j;
					max = array[j];
				}
			}
			
			if(h.size()==1) {
				System.out.println(-1);
			}else {
				System.out.println(ans+1);
			}
		}
	}

}
