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

import re
def count(arr):
    allmatch=re.findall("0+",arr)
    if arr[0]=='0':
        allmatch.pop(0)
    
    if allmatch and arr[len(arr)-1]=='0':
        allmatch.pop()
    ans=0
    for i in range(len(allmatch)):
        ans+=len(allmatch[i])
    return ans
for i in range(int(input())):
    n=int(input())
    a=[int(x) for x in input().split()]
    mx=max(a)
    flag=True
    for j in a:
        if mx!=j:
            flag=False
            break
    ans=-1
    if not(flag or n==1):
        for j in range(n):
            if a[j]==mx and j==0 and a[j+1]!=mx:
                ans=j+1
                break 
            if a[j]==mx and j==n-1 and a[j-1]!=mx:
                ans=j+1
                break 
            if a[j]==mx and j!=0 and j!=n-1 and (a[j-1]!=mx or a[j+1]!=mx):
                ans=j+1
                break
    print(ans)