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 t in range(T):
    n = int(input())
    a = list(map(int, input().split()))
    
    ec, pi, found = 0, 0, False
    pec = 0
    for i in range(1, n):
        if(a[pi] == a[i] and not found):
            pi = i
            continue
        pec = ec
        if(a[pi] + ec < a[i]):
            ec += 1
            pi = i
            found = True
        elif(a[pi] + ec > a[i]):
            ec += 1
            found = True
        if(ec == pec):
            pi = i
    if(not found):
        print(-1)
    else:
        print(pi + 1)