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

import atexit, io, sys
 
# A stream implementation using an in-memory bytes 
# buffer. It inherits BufferedIOBase.

buffer = io.BytesIO()

sys.stdout = buffer
 
# print via here

@atexit.register

def write():

    sys.__stdout__.write(buffer.getvalue())

for _ in range(input()):
    n=input()
    a=map(int,raw_input().split())
    if len(set(a))==1:
        print -1;continue
    a=[float('inf')]+a+[float('inf')]
    ans=[0]*(n+1)
    p=0;ip=-1
    for i in range(1,n+1):
        if (a[i]>a[i-1] and a[i]>a[i+1]) or(a[i]==a[i+1] and a[i]>a[i-1]) or(a[i]==a[i-1] and a[i]>a[i+1]):
            ans[i]=a[i]+2
        elif a[i]>a[i-1] or a[i]>a[i+1]:
            ans[i]=a[i]+1
        else:
            ans[i]=a[i]
        if ans[i]>=p:
            p=ans[i];ip=i
    print ip