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

n = int(input())
for i in range(n):
    t = int(input())
    l = list((map(int,input().split())))
    m = max(l)
    if l.count(m) == t:
        print(-1)
        continue

    for i in range(len(l)):
        if l[i] == m:
            if i == 0 and l[i] > l[i+1]:
                    print(i+1)
                    break

            elif i == t-1 and l[i] > l[i-1]:
                    print(i+1)
                    break
        
            elif (i!=0 and i!=t-1) and (l[i] > l[i+1] or l[i] > l[i-1]):
                    print(i+1)
                    break
            

         
 
