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 _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))
    maxind = 0
    true_ans = False
    cur_true_ans = False
    for i in range(n):
        cur_true_ans = a[i] > a[max(0, i - 1)] or a[i] > a[min(n - 1, i + 1)]
        if a[maxind] == a[i] and cur_true_ans and not true_ans:
            maxind = i
        if a[maxind] < a[i]:
            maxind = i
        true_ans = a[maxind] > a[max(0, maxind - 1)] or a[maxind] > a[min(n - 1, maxind + 1)]
    if a[maxind] > a[max(0, maxind - 1)] or a[maxind] > a[min(n - 1, maxind + 1)]:
        print(maxind + 1)
    else:
        print(-1)
