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())
for t in range(T):
    n = int(input())
    a = list(map(int, input().split()))
    
    nax = max(a)
    ans = -1

    if a[0] == nax:
        if a[1] != nax:
            print(1)
            continue
    if a[n-1] == nax:
        if a[n-2] != nax:
            print(n)
            continue

    for i in range(1,n-1):
        if a[i] == nax:
            if a[i-1] != nax or a[i+1] != nax:
                found = True
                ans = i+1
                break
    print(ans)
