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

for i in range(int(input())):
    a = int(input())
    b = [int(i) for i in input().strip().split(' ')]
    max_val = max(b)
    count=0
    prev = -1
    nextt = -1
    for i in range(len(b)):
        if b[i]==max_val:
            count+=1
            if i-1>=0:
                if b[i-1]!=max_val and prev==-1:
                    prev=i
            if i+1<=len(b)-1:
                if b[i+1]!=max_val and nextt==-1:
                    nextt=i
                
    if count!=len(b):
        if(nextt!=-1):
            print(nextt+1)
        else:
            print(prev+1)
    else:
        print(-1)
