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 j in range(t):
    kol = int(input())
    fish = [int(i) for i in input().split()]
    ans1=fish.index(max(fish))
    ans2=ans1
    if len(set(fish))==1:
        print(-1)
    else:
        for i in range(ans1+1,kol):
            if fish[ans1]!=fish[i]:
                break
            else:
                ans1+=1
        if ans1+1==kol:
            print(ans2+1)
        else:
            print(ans1+1)
