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

def main(n,s):
    dom=-100
    idx=0
    for i in range(n-1):
        if s[i]>=s[i+1]:
            if dom<=s[i]+1:
                dom=s[i]+1
                idx=i
                s[i]=dom
            else:
                dom+=1
        elif s[i]<s[i+1]:
            if s[i+1]+1>=dom:
                dom=s[i+1]+1
                s[i+1]=dom
                idx=i+1
            else:
                dom+=1
    if dom==-100:
        return -1
    return idx+1
k=int(input())
for _ in range(k):
    n=int(input())
    s=list(map(int,input().strip().split()))
    print(main(n,s))