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

from collections import defaultdict
for _ in range(int(input())):
    n = int(input())
    dic = defaultdict(lambda : [])
    ma = 0
    i = 0
    arr = []
    for el in map(int, input().split()):
        dic[el].append(i)
        arr.append(el)
        ma = max(ma, el)
        i += 1
    ans = -1
    for ind in dic[ma]:
        if ind == 0:
            if arr[ind + 1] != ma:ans=ind+1;break
        elif ind == n - 1:
            if arr[ind - 1] != ma:ans=ind+1;break
        else:
            if arr[ind + 1] != ma or arr[ind - 1] != ma:
                ans=ind+1;break
    print(ans)