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

test_cases=int(input())
res=[]
for test in range(test_cases):
    n=int(input())
    st=input()
    lst=st.split()
    n_lst=[]
    mx=-1
    for i in lst:
        n_lst.append(int(i))
        if n_lst[-1]>mx:
            mx=n_lst[-1]
    res.append(-1)
    for i in range(len(n_lst)):
        if n_lst[i]==mx:
            if i!=0:
                if n_lst[i-1]<mx:
                    res[-1]=i+1
                    break
            if i < len(n_lst)-1:
                if n_lst[i+1]<mx:
                    res[-1]=i+1
                    break
for test in range(test_cases):
    print(res[test])