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())
for i in range(0,n):
    o=int(input())
    p=input().rstrip().split(' ')
    if len(list(set(p))) == 1:
        print(-1)
    else:
        C=list(p)
        G=-1;
        C.sort(key=int,reverse=True)
        A=int(C[0])
        for j in range(0,len(p)):
            if j==0:
                if int(p[j])==A and int(p[j+1])<int(p[j]):
                    G=j;
                    break;
            elif j==len(p)-1:
                if int(p[j])==A and int(p[j-1])<int(p[j]):
                    G=j;
                    break;
            else:
                if int(p[j])==A and (int(p[j+1])<int(p[j]) or int(p[j-1])<int(p[j]) ):
                    G=j;
                    break;                
        if G==-1:
            print(-1)
        else:
            print(G+1);