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

def solve(piranhas):
    current_biggest = 0
    current_ans = -1
    piranhas = [2**31, *piranhas, 2**31]
    for i in range(1, len(piranhas) - 1):
        if piranhas[i] >= current_biggest:
            current_biggest = piranhas[i]
            if piranhas[i-1] < current_biggest or current_biggest > piranhas[i+1]:
                current_ans = i
    return current_ans

if __name__ == '__main__':
    for t in range(int(input())):
        n = int(input())
        print(solve(list(map(int, input().split()))))

    	 	  				  	  		 	 	   		 	