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

a = int(input())
for i in range (a):
    b = int(input()) - 1
    g = b
    c = list(map(int, input().split()))
    d = 0
    e = 0
    f = 0
    for j in range (b):
        if c[j] > d and not d:
            d = c[j]
            if c[j] > c[j + 1]:
                f += 1
                e = j + 1
        elif c[j] == d and not f:
            b -= 1
            if c[j] > c[j + 1]:
                f = 1
                e = j + 1
        elif c[j] > d:
            d = c[j]
            e = j + 1
        elif c[j] == d:
            b -= 1
    if c[g] > d:
        e = g + 1
    elif c[g] == d:
        b -= 1
    if not b:
        print(-1)
    else:
        print(e)