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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//import java.util.Arrays;
import java.util.StringTokenizer;
//import java.util.Collections;
//import java.util.LinkedList;
import java.util.ArrayList;


public class Solution {
	
//    I saw the editorial
	
	public static void print(int arr[][]) {
		int n=arr.length;
		for(int i=0;i<n;i++) {
			for(int j=0;j<n;j++) {
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
	}
	
	public static void solve(int l,int r,String s) {
		
	}
	
	public static void main(String[] args){
		FastScanner fs = new FastScanner();
		int t=fs.nextInt();
		while(t-->0) {
			int n=fs.nextInt();
			int arr[]=fs.readArray(n);
			int max=Integer.MIN_VALUE;
			for(int i=0;i<n;i++) {
				if(max<arr[i]) {
					max=arr[i];
				}
			}
			ArrayList<Integer>a=new ArrayList<Integer>();
			for(int i=0;i<n;i++) {
				if(max==arr[i]) {
					a.add(i+1);
				}
			}
			int index=1;
			int temp=a.get(0);
			for(int i=1;i<a.size();i++) {
				if(++temp==a.get(i)) {
					index=a.get(i);
					
				}
				else {
					break;
				}
			}
			if(a.size()==n)System.out.println(-1);
			else System.out.println(index);
		}
		
	}
	


	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		
		int[][] readArray(int n,int m) {
			int[][] a=new int[n][m];
			for (int i=0; i<n; i++) for(int j=0; j<m; j++) a[i][j]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	
}