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


public class C{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int TC = Integer.parseInt(br.readLine());
        while(TC-->0){
            int n = Integer.parseInt(br.readLine());
            int arr[] = new int[n+1];
            StringTokenizer st = new StringTokenizer(br.readLine());
            int e = -1;
            boolean f = true;
            for(int i = 1; i<=n; ++i){
                arr[i] = Integer.parseInt(st.nextToken());
                if(i==1){
                    e = arr[1];
                }else{
                    if(e!=arr[i]) f = false;
                }
            }

            if(f){
                System.out.println(-1);
                continue;
            }

            int max = Integer.MIN_VALUE;
            for(int i = 1; i<=n; ++i){
                max = Math.max(max, arr[i]);
            }

            int ans = -1;
            for(int i = 1; i<=n; ++i){
                if(arr[i]==max){
                    if(i>1){
                        if(arr[i-1]!=max){
                            ans = i;
                            break;
                        }
                    }
                    if(i<n-1){
                        if(arr[i+1]!=max){
                            ans = i;
                            break;
                        }
                    }
                }
            }

            System.out.println(ans);
        }
    }
}