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())
while(t>0):
    n = int(input())
    a = list(map(int, input().split()))[:n]
    if(a.count(a[0])==n):
        print(-1)
    else:
        m = max(a)
        ind = a.index(m)
        if (a.count(m)>1 and a[0]==m):
            while(a[ind+1]==m) :
                ind += 1
        print(ind + 1)
    t = t -1
