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 dominant_piranha(piranhas):
    max_element = max(piranhas)
    idx= -1
    for i in range(len(piranhas)):
        if i == 0:
            if piranhas[i] > piranhas[i+1]:
                if piranhas[i] + len(piranhas)-1 > max_element:
                    idx= i+1
        elif i == len(piranhas)-1:
            if piranhas[i] > piranhas[i-1]:
                if piranhas[i] + len(piranhas)-1 > max_element:
                    idx = i+1
        else:
            if piranhas[i-1] < piranhas[i] or piranhas[i] > piranhas[i+1]:
                if piranhas[i] + len(piranhas)-1 > max_element:
                    idx = i+1
    return idx

t = int(input())
for i in range(t):
    n = int(input())
    piranhas = [int(x) for x in input().split()]
    print(dominant_piranha(piranhas))


# for _ in range(int(input())):
#     n=int(input())
#     lst=list(map(int,input().split()))
#     index=-1
#     ans=max(lst)
#     for i in range(n):
#         if lst[i]==ans and ((i>0 and lst[i-1]<lst[i]) or (i<n-1 and lst[i+1]<lst[i])):
#             index=i+1
#     print(index)
