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())
    a=input().split()
    for x in range(n):
        a[x]=int(a[x])
    asorted=sorted(a)
    if len(a)==1:
        print(1)
    elif asorted[0]==asorted[n-1]:
        print(-1)
    else:
        for x in range(0,n):
            
            if x==0:
                if a[x]==asorted[n-1] and a[x+1]!=asorted[n-1]:
                    c=x
                    break
            elif x==n-1:
                if a[x]==asorted[n-1] and a[x-1]!=asorted[n-1]:
                    c=x
                    break
            else:
                if a[x]==asorted[n-1] and a[x+1]!=asorted[n-1] or a[x]==asorted[n-1] and a[x-1]!=asorted[n-1]:
                    c=x
                    break
                
        print(c+1)
