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.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Random;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Contest {
	private static PrintWriter out = new PrintWriter(System.out);
	private static final Random random = new Random();
	private static int n, m, k, tc;
	private static int[] a;
	private static int[][] grid;
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		tc = sc.nextInt();
		while(tc-->0) {
			n = sc.nextInt();
			a = new int[n];
			for(int i = 0;i < n;i++) {
				a[i] = sc.nextInt();
			}
			boolean not = false;
			for(int i = 0;i < n - 1;i++) {
				if(a[i] != a[i + 1]) {
					not = true;
					break;
				}
			}
			if(!not) {
				out.println(-1);
				continue;
			} else {
				int max_id = 0;
				for(int i = 0;i < n;i++) {
					if(i == 0) {
						if(a[i + 1] < a[i] && a[max_id] <= a[i]) {
							max_id = i;
						}
					} else if(i == n - 1) {
						if(a[i - 1] < a[i] && a[max_id] <= a[i])
							max_id = i;
					} else  {
						if((a[i + 1] < a[i] || a[i - 1] < a[i]) && a[max_id] <= a[i]) {
							max_id = i;
						}
					}
				}
				out.println((max_id+1));
			}
		}
		out.flush();
	}


	static void ruffleSort(int[] a) {
		int n = a.length;// shuffle, then sort
		for (int i = 0; i < n; i++) {
			int oi = random.nextInt(n), temp = a[oi];
			a[oi] = a[i];
			a[i] = temp;
		}
		java.util.Arrays.sort(a);
	}

	private static class Scanner {
		public BufferedReader reader;
		public StringTokenizer st;

		public Scanner(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null)
						return null;
					st = new StringTokenizer(line);
				} catch (Exception e) {
					throw (new RuntimeException());
				}
			}
			return st.nextToken();
		}

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

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

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

}