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.math.BigInteger;
import java.nio.channels.FileChannel;
import java.util.*;

import java.util.ArrayList;

import java.util.Scanner;


public class adaking {

    static class pair
    {
        int first;
        int second;

        pair(int a, int b)
        {
            first = a;
            second = b;
        }
    }

    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;
        }
    }

    static final int mod = 1000000007;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        //sc.nextLine();

        for (int test = 0; test < t; test++)
        {
          int n=sc.nextInt();
          int maxe=Integer.MIN_VALUE;
            int a[]=new int [n];

          for(int j=0;j<n;j++) {
              a[j] = sc.nextInt();
              maxe=Math.max(maxe,a[j]);
          }

            int ans=-1;
            for(int j=0;j<n;j++) {
                if(a[j]==maxe&&j-1>=0&&a[j-1]<a[j])
                {
                    ans=j;
                    break;
                }
                if(a[j]==maxe&j+1<n&&a[j+1]<a[j])
                {
                    ans=j;
                    break;
                }
            }
          Arrays.sort(a);
          if(maxe==a[0])
              System.out.println(-1);
          else
              System.out.println(ans+1);

        }

    }
}









