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 _ in range(t):
    n = int(input())
    fish = list(map(int, input().split()))
    
    found = False
    ans = -1
    idx = 0
    maxFish = 0
    strongestFishIdx = 0
    while idx < n:
        if fish[idx] >= maxFish:
            maxFish = fish[idx]
            if (idx == 0 and fish[idx + 1] != fish[idx]) or \
               (idx == n - 1 and fish[idx] != fish[idx - 1]) or \
               (0 < idx < n - 1 and (fish[idx] != fish[idx - 1] or fish[idx] != fish[idx + 1])):
                strongestFishIdx = idx
                found = True

        idx += 1

    if found > 0:
        ans = strongestFishIdx + 1

    print(ans)