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())
    arr = list(map(int, sys.stdin.readline().split()))
    maxp = max(arr)
    length = len(arr)
    for i in range(length):
        if maxp == arr[i]:
            if i == 0 and maxp > arr[i + 1]:
                print(i + 1)
                break
            elif i == length - 1 and maxp > arr[i - 1]:
                print(i + 1)
                break
            elif i != 0 and i != length - 1 and (arr[i - 1] < maxp or arr[i + 1] < maxp):
                print(i + 1)
                break
        if i == length - 1:
            print(-1)
