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

# https://codeforces.com/contest/1433/problem/C
import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
# do magic here
t = int(input())
for _ in range(t):
    n = int(input())
    arr = list(map(int, input().split()))
    if len(set(arr)) == 1:
        print(-1)
    else:
        mx = max(arr)
        ans = 1
        for x in range(n):
            if arr[x] == mx:
                a, b = False, False
                if x-1 >= 0 and arr[x-1] < mx:
                    a = True
                if x+1 < n and arr[x+1] < mx:
                    b = True
                if a or b:
                    ans = x+1
                    break
        print(ans)
