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 pirana_loca(pir):
    result = False

    if len(pir) == 1:
        return 1

    if len(pir) > 0:
        result = all(elem == pir[0] for elem in pir)

    if result == True:
        return -11

    for i in range(len(pir)):
        if i == 0:
            if pir[i+1] < pir[i]:
                return i+1
        elif i == len(pir)-1:
            if pir[i-1] < pir[i]:
                return i+1

        elif pir[i+1] < pir[i] or pir[i-1] < pir[i]:
            return i+1
    return -1

ncases = int(input())
arre = []
for i in range(ncases):
  npiranas = int(input())
  piranas = input().split()
  arre.append(pirana_loca(piranas))

for i in arre:
  print(i)

			 		 		 		  	 	 		  	 	  		