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

# cook your dish here
t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    if a.count(a[0])==n:
        print(-1)
    else:
        x=max(a)
        if a.count(x)==1:
            print(a.index(x)+1)
        elif a.index(x)!=0 and a.index(x)!=n-1:
            print(a.index(x)+1)
        else:
            for i in range(0,n-1):
                if a[i]==x:
                    if a[i+1]!=x:
                        print(i+1)
                        break
                elif a[i]!=x and a[i+1]==x:
                    print(i+2)
                    break
        