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 test in range(input()):
    n = input()
    a = map(int,raw_input().split())
    if len(set(a))==1:
        print -1
        continue
    m = max(a)
    ind = []
    for i in range(n):
        if a[i]==m:
            ind.append(i)
    flag = 0
    for i in range(len(ind)):
        x = ind[i]
        f1 = 0
        f2 = 0
        if x-1>=0:
            if a[x-1]<a[x]:
                f1 = 1
        if x+1<n:
            if a[x+1]<a[x]:
                f2 = 1
        if f1==1 or f2==1:
            print x+1
            flag = 1
            break
    if flag==0:
        print -1
        
