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
INP = lambda: sys.stdin.readline().strip()
INT = lambda: int(INP())
MAP = lambda: map(int, INP().split())
ARR = lambda: [int(i) for i in INP().split()]
def JOIN(arr, x=' '): return x.join([str(i) for i in arr])
def EXIT(x='NO'): print(x); exit()

for _ in range(INT()):
    n,arr = INT(),ARR()
    m = max(arr)
    i = arr.index(m)
    if i>0 or (i==0 and arr[1]!=m):
        print(i+1)
        continue
    ans = -1
    for i in range(1,n):
        if arr[i]==m:
            if arr[i-1]!=m:
                ans = i+1
                break
            elif i<n-1:
                if arr[i+1]!=m:
                    ans = i+1
                    break
    print(ans)