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

public class dominantPirhana {
	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) {
		FastReader sc = new FastReader();
		int t=sc.nextInt();
		while(t-->0)
		{
			int n=sc.nextInt();
			int a[]=new int[n];
			HashSet<Integer> h=new HashSet<>();
			
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
				h.add(a[i]);
			}
			
			if(h.size()==1)
			{
				System.out.println("-1");
			}
			else if(h.size()>0)
			{
				int max=-1;
				int maxi=-1;
				for(int i=0;i<n-1;i++)
				{
					if(a[i]>max && a[i+1]<=a[i])
					{
						max=a[i];
						maxi=i;
					}
				}
				//System.out.println("maxi:" +maxi);
				if(a[n-1]>max)
				{
					max=a[n-1];
					maxi=n-1;
				}
				if(maxi+1==0)
				{
					for(int i=n-1;i>0;i--)
					{
						if(a[i]>max && a[i]>=a[i-1])
						{
							max=a[i];
							maxi=i;
						}
					}
					if(a[0]>max)
					{
						max=a[0];
						maxi=0;
					}
				}
				System.out.println(maxi+1);
			}
		}
	}
}