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

for _ in range(int(input())):
    n = int(input())
    a = list(map(int,input().split()))
    b = a.copy()
    
    #print(a)
    
    if(a.count(a[0])==n):
        print("-1")
    else:
        z = []
        i = 0
        while(i<len(a)-1):
            flag = 0
            if a[i]>a[i+1]:
                z.append(i)
                a[i]+=1
                a.pop(i+1)
                flag = 1
            
            elif a[i]<a[i+1]:
                z.append(i+1)
                a[i+1]+=1
                a.pop(i)
                flag = 1
            
            if flag==1:
                i=0
            else:
                i+=1
        
        print((z[0])+1)
        