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 find_dominant(fishes):
    mxm = max(fishes)
    lng = len(fishes)
    i = 0
    for i in range(lng):
         prev = fishes[i - 1] if i > 0 else None
         next = fishes[i + 1] if i < lng - 1 else None
         if fishes[i] == mxm and ((i and ((i < lng - 1 and (prev < mxm or next < mxm)) or (i == lng - 1 and prev < mxm)) or (not i and next < mxm))) :
             return i
    return -1

for test in range(int(input())):
    m = int(input())
    fishes = list(map(int, input().split()))[:m]
    result = find_dominant(fishes)
    print(result + 1 if result >= 0 else result)
