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.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
public class Main {
public static void main(String[] args) {
    //solution start :-)
     Scanner sc = new Scanner(System.in);
		 int t = sc.nextInt();
		 while(t-->0) {
			 ArrayList<Integer> al = new ArrayList<>();
			 int n = sc.nextInt();
			 int a[] = new int[n];
			 
			 for(int i=0;i<n;i++) {
				 a[i] = sc.nextInt();
			 }
			 int max = a[0];
			 int ind = 0;
			 for(int i=0;i<n;i++) {
				 if(a[i]>max) {
					 max = a[i];
					 ind = i;
				 }
			 }
			 if(n==2) {
				 if(a[0]==a[1]) System.out.println(-1);
				 else System.out.println(ind+1);
			 }
			 else {
				 if(ind == 0) {
					 if(a[1]==a[0]) System.out.println("-1");
					 else System.out.println(ind+1);
				 }
				 else if(ind==(n-1)) {
					 if(a[n-2]==a[n-1]) System.out.println("-1");
					 else System.out.println(ind+1);
				 }
				 else {
					 if(a[ind-1]==a[ind] && a[ind+1]==a[ind]) System.out.println("-1");
					 else System.out.println(ind+1);
				 }
			 }
			 
			 
			 
			 
		 }
		
		
    //	solution end \(^-^)/
    //		        |
    //		       / \
}}