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

# C. Dominant Piranha
for t in range(int(input())):  # test case

    n = int(input())
    M = [int(i) for i in input().split()]

    N = set(M)
    lar, ans = 0, 0
    count, flag = 0, 0
    pos, ros = 0, 0
    if len(N) == 1:
        ans = -1
    else:
        for i in range(n):
            if M[i] > lar:
                lar = M[i]
                pos = i
                ans = i + 1
                count = 0

            elif M[i] == lar:
                pos = i
                count += 1

            elif M[i] < lar:
                if ros == 0 and count == (i - 1):
                    ans = i
                    flag = 1

            elif flag == 1:
                break
    print(ans)





