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.*;

public class C {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int tst = Integer.parseInt(br.readLine());
        while(tst-->0){
            int n = Integer.parseInt(br.readLine());
            StringTokenizer st = new StringTokenizer(br.readLine());
            int[] arr = new int[n];
            for(int i = 0; i<n; i++){
                arr[i] = Integer.parseInt(st.nextToken());
            }
            boolean eq = true;
            for(int i = 1; i<n; i++){
                if(arr[0] != arr[i]){
                    eq = false;
                }
            }
            if(eq){
                sb.append(-1).append('\n');
            }
            else{
                int max = Arrays.stream(arr).max().orElse(0);
                int ans = -1;
                for(int i = 0; i<n; i++){
                    if(arr[i] == max){
                        if(i>=1 && arr[i]!=arr[i-1]){
                            ans = i;
                            break;
                        }
                        if(i+1<n && arr[i]!=arr[i+1]){
                            ans = i;
                            break;
                        }
                    }
                }
                sb.append(ans+1).append('\n');
            }
        }
        System.out.println(sb);
    }
}
