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 i in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    b = a[0]
    k = 0
    if a.count(b) == len(a):
        print(-1)
    else:
        for j in range(len(a)):
            if a[j] > b:
                k = j
                b = a[j]

        q = a.count(a[k])
        if q == 1:
            print(k+1)
        else:
            for j in range(len(a)):
                if a[j] == a[k]:
                    if j != 0 and j != len(a)-1:
                        if a[j-1] != a[j] or a[j+1] != a[j]:
                            k = j
                            break
                    else:
                        if j == 0:
                            if a[j] != a[j+1]:
                                k = j
                                break
                        else:
                            if a[j] != a[j-1]:
                                k = j
                                break
            print(k+1)

