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

cases=input()
p=0
while p<int(cases):
    p+=1
    case=[]
    many=input()
    lis=input().split(' ')
    for u in lis:
        case.append(int(u))
    mi=min(case)
    ma=max(case)
    if mi==ma:
        print("-1")
    else:
        for x in range(len(case)):
            if case[x]>case[x+1]and case[x]==ma:
                print(x+1)
                break
            elif case[x]<case[x+1] and case[x+1]==ma:
                print(x+2)
                break