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.*;
import java.util.*;
import java.util.regex.*;


public class Main {
	static void Heapify(int a[] , int n)
	{
		for (int i = 1; i < n; ++i)
		{
			int temp = a[i];
			int s = i;
			int f = (s-1)/2;
			while(f>=0 && a[s]>a[f])
			{
				a[s]=a[f];
				a[f]=temp;
				s=f;
				f = (s-1)/2;	
			}
		}
	}

	static void HeapSort(int a[] , int n)
	{
		int temp,s,f;
		for (int i = n-1; i >0 ; --i)
		{
			temp = a[i];
			a[i]=a[0];
			a[0]=temp;
			f=0;
			s=1;
			if(2<i && a[2]>a[1])
				s++;
			while(s<i && a[s]>a[f] )
			{
				a[f]=a[s];
				a[s]=temp;
				f=s;
				s=2*f+1;
				if(s+1<i && a[s+1]>a[s] )
					s++;
			}
		}
	}
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader()
		{
			br = new BufferedReader(
				new InputStreamReader(System.in));
		}

		String next()
		{
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() { return Integer.parseInt(next()); }

		long nextLong() { return Long.parseLong(next()); }

		double nextDouble()
		{
			return Double.parseDouble(next());
		}

		String nextLine()
		{
			String str = "";
			try {
				str = br.readLine();
			}
			catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	public static void main(String[] args) throws Exception 
	{
		BufferedWriter op = new BufferedWriter( new OutputStreamWriter(System.out)); 
		FastReader sc = new FastReader();
		int t = sc.nextInt();
		while(t>0)
		{
			int n = sc.nextInt();
			int a [] = new int [n];
			for(int i = 0 ;i<n;i++)
				a[i]= sc.nextInt();
			int i = 0 ;
			int max = 0 ;
			int maxi  = 0;
			int flag =0;
			while(i<n-1)
			{
				if(a[i]!= a[i+1])
				{
					flag = 1;
					if(a[i]>max)
					{
						max = a[i];
						maxi = i;
					}
					if(a[i+1]>max)
					{
						max = a[i+1];
						maxi = i+1;
					}
				}
				i++;
			}
			maxi++;
			if(flag == 0)
				op.write(-1 + "");
			else
				op.write(maxi + "");

			
			



			
			op.write("\n");
			op.flush();
			t--;
		}

	}
}
