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())
while t:
    t -= 1
    n = input()
    a = [int(i) for i in input().split()]
    mxi = 0
    isd = False
    for i in range(len(a)):
        if a[i] != a[mxi]:
            isd = True
        if a[i] > a[mxi]:
            mxi = i
    if not isd:
        print(-1)
    else:
        if mxi == 0:
            while a[mxi] == a[0]:
                mxi += 1
            mxi -= 1
        print(mxi + 1)
