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 math
import sys,bisect
from heapq import *
from itertools import *
from collections import *
sys.setrecursionlimit(10 ** 6)
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
for _ in range(I()):
    n = I()
    A = Neo()
    if len(set(A)) == 1:
        print(-1)
    else:
        t = max(A)
        f = 0
        for i in range(n):
            if A[i] == t:
                if i == 0:
                    if A[i] > A[i+1]:
                        f = 1
                        print(i+1)
                        break
                elif i == n-1:
                    if A[i] > A[i-1]:
                        f = 1
                        print(i+1)
                        break
                else:
                    if A[i] > A[i-1] or A[i] > A[i+1]:
                        f = 1
                        print(i+1)
                        break
        if f == 0:
            print(-1)            
