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

// Solution:
// ami assume korchi tui problem ta bujhechish..
// dekh, jehetu amader emon akta element baar korte hobe, such that oi element ta pasher
// element gulor theke boro, and ultimately array r shobkota element er theke boro hoe..
// tai, amra start off korte pari with such an index i, such that a[i] is the max element of the array.
// ebar notice kor, if a[i] taar jekono paasher element k khete paare, then a[i] INCREASE korche
// which means a[i] ekhon array r shobkota element er theke boro
// tai now it can swallow up any element which it wants, and shesh porjonto it will end up swallowing whole array.
// so, ebar eta holo solution ta.. ebar eta implement korbi kikore?
// dekh, consider all indices i, such that a[i] = max element of the array as potential starting points
// ebar, if a[i]>a[i-1] or a[i]>a[i+1] tahole a[i] can swallow i-1 or i+1 th index..
// taar maane, after swallowing, a[i]=a[i]+1, and ekhon ota array er shobkota element er theke boro.
// ebar o jebhabe icche, in any order, akta akta kore puro array ta k kheye nite paare.
// tai, amra jodi emon akta index, i pai such that a[i] = max element of the array, and a[i]>a[i-1] or a[i]>a[i+1]
// tahole shei index ta holo amader answer.
// otherwise amra jodi serom kono element puro array te na khuje pai, tahole answer is -1.
// solution ta java te likhechi, bujhte parbi ig.. dekhe ne..

import java.util.*;
public class Main {
    
    static Scanner in=new Scanner(System.in);
    static void solve() {
        int n=in.nextInt();
        long[] a=new long[n];
        for(int i=0;i<n;i++) a[i]=in.nextLong();

        long maxElement=-1;
        for(int i=0;i<n;i++) maxElement=Math.max(maxElement,a[i]);

        for(int i=0;i<n;i++) {
            if(a[i]==maxElement) {
                if((i-1>=0&&a[i-1]<a[i])||(i+1<n&&a[i+1]<a[i])) {
                    System.out.println(i+1);
                    return;
                }
            }
        }
        System.out.println(-1);
    }

    public static void main(String[] args) throws Exception {
        int t=in.nextInt();
        while(t-->0) solve();
    }
}