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 i in range(t):
    n = int(input())
    li = list(map(int,input().split()))
    l=len(li)
    m = max(li)
    # print(m)
    # print(li,l)
    if li[0] == m and li[0]!=li[1]:
        print(1)
    elif li[l-1] == m and li[l-2]!=m:
        print(l)
    else:
        for j in range(1,l-1):
            if li[j] == m and (li[j-1]<li[j] or li[j+1]<li[j]):
                print(j+1)
                break
        else:
            print(-1)

