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 br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		StringTokenizer s = new StringTokenizer(br.readLine());
		int tc = Integer.parseInt(s.nextToken());
		while(tc-->0) {
			s = new StringTokenizer(br.readLine());
			int n = Integer.parseInt(s.nextToken());
			int ar[] =new int [n];
			s = new StringTokenizer(br.readLine());
			for(int i =0 ;i<n;i++)
				ar[i]=Integer.parseInt(s.nextToken());
			int max =Integer.MIN_VALUE;
			int index=-1;
			for(int i =0;i<n;i++) {
				max = Math.max(max, ar[i]);
			}
			int count =0;
			for(int i =0;i<n;i++) {
				if(ar[i]==max) {
					if((i+1<n&& max>ar[i+1]) || (i-1>=0&& max>ar[i-1]))index=i;
					count++;
				}
			}
			if(count==n)
				pw.println(-1);
			else
				pw.println(index+1);
		}
		pw.close();
		
		
	
	}
}
