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

import math
test = int(input())
for t in range(test):
    tt = 0
    pp = 0
    cc = ""
    ss = ""
    dd = 1
    cnttt = 0
    #write yoour code here
    n = int(input())
    A = list(map(int,input().split()))
    a = max(A)
    ans = -1
    for i in range(n):
        if(a==A[i]):
            if(i>=1 and A[i-1]<a):
                ans = i+1
                break
            if(i<n-1 and A[i+1]<a):
                ans = i+1
                break
    print(ans)



