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 sys

test_case_num = int(input())

for i in range(test_case_num):
    num = int(input())
    p = list(map(int, input().split()))
    max_size = max(p)
    answer=-1

    if len(set(p)) != 1:
        for j in range(num):
            if p[j] == max_size:
                if j==0 and p[j+1]<p[j]:
                    answer = j+1
                    break
                elif j==num-1 and p[j-1]<p[j]:
                    answer = j+1
                    break
                elif j!=0 and j!=num-1 and (p[j-1] < p[j] or p[j+1] < p[j]):
                    answer = j+1
                    break
    print(answer)