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

n = int(input())
sol = []
lists = []
for lis in range(n):
    length = int(input())
    aq = input().split()
    for i in range(length):
        aq[i] = int(aq[i])
    lists.append(aq)
for aq in lists:
    t_max = max(aq)
    t_min = min(aq)
    if t_min < t_max:
        for i in range(len(aq)):
            if i == 0 and aq[i] == t_max and (aq[i] > aq[i+1]):
                sol.append(i+1)
                break
            elif i == (len(aq)-1) and aq[i] == t_max and (aq[i] > aq[i-1]):
                sol.append(i+1)
                break
            elif not(i == 0 or i == (len(aq)-1)) and aq[i] == t_max and (aq[i] > aq[i+1] or aq[i] > aq[i-1]):
                sol.append(i+1)
                break
    else:
        sol.append(-1)
for ans in sol:
    print(ans)
 	    		   	  	    	   	 	 	