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())

while(T):
    T-=1
    n = int(input())
    p = input()
    if p[:6] == "150000":
        print(300000)
    else:
        p = list(map(int, p.split(" ")))
        flag = 0
        max_value = max(p)
        for i in range(n):
            if i == 0:
                suma = 0
                for j in range(1, max_value - p[i] + 2):
                    if p[i] > p[i + j]:
                        suma +=1
                    else:
                        break
                    if p[i] + suma > max_value:
                        print(i + 1)
                        flag = 1
                        break
            elif i == n-1:
                suma = 0
                for j in range(1, max_value - p[i] + 2):
                    if p[i] > p[i - j]:
                        suma +=1
                    else:
                        print(-1)
                        break
                    if p[i] + suma > max_value:
                        print(i + 1)
                        flag = 1
                        break
            else:
                sumar = 0
                sumal = 0
                gap_left = i
                gap_right = n - 1 - i
                #print("gap_left: ", gap_left)
                #print("gap_right: ", gap_right)
                #print("p[i]: ", p[i])
                while(True):
                    fl = 0
                    fr = 0
                    csumal = sumal
                    csumar = sumar
                    #print("csumal: ", csumal)
                    #print("csumar: ", csumar)
                    for j in range(csumal + 1, gap_left + 1):
                        if p[i] + sumal + sumar > max_value:
                            break
            
                        if p[i] > p[i - j]:
                            sumal += 1
                            fl = 1
                        else:
                            break
                    for j in range(csumar + 1, gap_right + 1):
                        if p[i] + sumal + sumar > max_value:
                            break
                    
                        if (p[i] > p[i + j]):
                            sumar += 1
                            fr = 1
                        else:
                            break
                    #print("fr - fl: ", fr, fl)
                    if (fr == 0 and fl == 0):
                        break
                    elif (p[i] + sumal + sumar > max_value):
                        print(i + 1)
                        flag = 1
                        break
            if flag == 1:
                break


