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())
    piranha=list(map(int, input().split()))
    if piranha.count(piranha[0]) == len(piranha):
        print(-1)
        continue
    x=max(piranha)
    if piranha.count(x)==1:
        print(piranha.index(x)+1)
    else:
        ans=None
        for i in range(n):
            if piranha[i]!=x:
                continue
            if i==0:
                if piranha[1]!=x:
                    ans=1
                    break
                continue
            if i==n-1:
                if piranha[n-2]!=x:
                    ans=n
                    break
                continue
            else:
                if piranha[i-1]!=x or piranha[i+1]!=x:
                    ans=i+1
                    break
        print(ans)