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

T = int(sys.stdin.readline())
for _ in range(T):
    n = int(sys.stdin.readline())
    list_num = [1000000000] + list(map(int, sys.stdin.readline().split())) + [1000000000]
    now = -1
    for i in range(1, n+1):
        if list_num[i] > list_num[i+1] or list_num[i] > list_num[i-1]:
            if now == -1:
                now = i
            elif list_num[now] < list_num[i]:
                now = i
    print(now)