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

import itertools

def solve():
    n = int(input().strip())
    piranhas = [int(x) for x in input().strip().split()]
    dominant_piranha = max(piranhas)
    dominant_indices = [x for x in range(n) if piranhas[x] == dominant_piranha]
    for dp in dominant_indices:
        if dp > 0 and piranhas[dp] > piranhas[dp - 1]:
                return dp + 1
        if dp < n - 1 and piranhas[dp] > piranhas[dp + 1]:
                return dp + 1
    return -1

if __name__=='__main__':
    for _ in range(int(input().strip())):
        print(solve())