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

a=int(input())
for i in range(a):
    s=int(input())
    z=list(map(int,input().split()))
    if(len(z)==z.count(max(z))):
        print(-1)
    else:
        t=max(z)
        flag=0
        for i in range(len(z)):
            if(i>0 and i<len(z)-1):
                if((z[i+1]<t or z[i-1]<t) and z[i]==t and flag==0) :
                    print(i+1)
                    flag=1
                    break;
            
            else:
                if(i==0 and z[0]==t and z[1]<t and flag==0):
                    print(1)
                    flag=1
                    break;
                if(i==len(z)-1 and z[-1]==t and z[-2]<t and flag==0):
                    print(len(z))
                    flag=1
                    break;

