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

p = int(input())
while p:
    t = int(input())
    n = t - 1
    j = 0
    max = 0
    a = list(map(int, input().split()))
    for i in range(t):
        if i == 0:
            max = a[0]
        if a[i] != a[i - 1] and i != 0:
            if a[i] > a[i - 1]:
                if a[i] >= max:
                    max = a[i]
                    j = i
                else:
                    True
            else:
                if a[i - 1] >= max:
                    max = a[i - 1]
                    j = i - 1
                else:
                    True
        elif max == a[i] and a[i - 1] == a[i] and n != 0:
            n -= 1
    if n != 0:
        print(j + 1)
    else:
        print(-1)
    p -= 1
