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

for _ in range(int(input())):
    n = int(input())
    aa = list(map(int,input().split()))
    xa = aa[0]
    cnta = 0
    ansa = -10e9
    for i in range(n):
        if aa[i]==xa:
            cnta+=1
        ansa = max(ansa,aa[i])

    if cnta==n:
        print(-1)
    else:
        q = False
        for i in range(1,n):
            if aa[i]==ansa and aa[i-1]!=ansa:
                q = True
                print(i+1)
                break
        if not q:
            for i in range(n-1):
                if aa[i]==ansa and aa[i+1]!=ansa:
                    print(i+1)
                    break
                