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

t=int(input())



for i in range(t):

    s=input()
    s=input()
    s1=s.split()
    l=[int(i) for i in s1]
    flag=0
    start=l[0]
    for i in range(len(l)):

        if l[i]!=start:

            flag=1
            break
    if flag==0:
        print(-1)


    else:

        maxval=max(l)


        for i in range(len(l)):

            if l[i]==maxval:

                if i>0 and l[i]>l[i-1]:

                    print(i+1)
                    break
                if i<len(l)-1 and l[i]>l[i+1]:

                    print(i+1)
                    break
    
            

        

    
