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())
    arr = list(map(int,input().split()))
    allEqual = True
    temp = arr[0]
    for num in arr:
        if num!=temp:
            allEqual=False
    biggest = max(arr)
    ans = 0
    for i in range(1,len(arr)-1):
        if (arr[i]==biggest and (arr[i]!=arr[i+1] or arr[i]!=arr[i-1])):
            ans = i
    if arr[0]==biggest and arr[1]<biggest:
        ans=0
    if arr[len(arr)-1]==biggest and arr[len(arr)-2]<biggest:
        ans = len(arr)-1
    if allEqual:
        print(-1)
    else:
        print(ans+1)