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

#Consistency is the key.
#code by: amritanshu
from sys import stdin,stdout
import math
from collections import deque
input=stdin.readline
def print(*args,end='\n'):
    s=[]
    for i in args:
        s.append(str(i)+' ')
    s=''.join(s)
    stdout.write(s+end)


def solve():
    n=int(input())
    l=list(map(int,input().split()))
    if len(set(l))==1:
        print(-1)
        return
    
    s=[l[0]]
    ans=[0]
    for i in range(1,n):
        if l[i]<s[-1]:
            s[-1]+=1
        else:
            s.append(l[i])
            ans.append(i)

    print(ans[s.index(max(s))]+1)
    
    

                                    
tt=1
tt=int(input())
for __ in range(tt):
    solve()
