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

# Why do we fall ? So we can learn to pick ourselves up.



t = int(input())
for _ in range(0,t):
    n = int(input())
    aa = [int(i) for i in input().split()]
    ss = -1
    mx = max(aa)
    for i in range(0,n):
        if aa[i] == mx:
            if i+1 < n and aa[i] > aa[i+1]:
                ss = i+1
                break
            if i-1 >= 0 and aa[i] > aa[i-1]:
                ss = i+1
                break
    print(ss)







"""
4
5
1 2 2 1 3
3
1 1 1
4
1 1000 101 1000
4
1 2 3 4



"""
