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())
ans = []
for i in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    if max(a) == min(a):
        print(-1)
    else:
        ind = 0
        maxel = max(a)
        if a[n - 1] == maxel and a[n - 2] != maxel:
            print(n)
        elif a[0] == maxel and a[1] != maxel:
            print(1)
        else:
            for j in range(1, n - 1):
                if a[j] == maxel: 
                    if a[j] > a[j - 1] or a[j] > a[j + 1]: 
                        ind = j + 1
                        print(ind)
                        break            
            