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 sys import stdin, stdout
input = stdin.readline
from collections import defaultdict as dd
import math
def geti(): return map(int, input().strip().split())
def getl(): return list(map(int, input().strip().split()))
def gets(): return input()
def geta(): return int(input())
def print_s(s): stdout.write(s+'\n')

def solve():
    for _ in range(geta()):
        n=geta()
        a=getl()
        ans=-1
        maxi=max(a)
        if len(set(a))==1:
            print(-1)
            continue
        for i in range(n):
            if a[i]==maxi:
                if (i>0 and a[i]>a[i-1]) or (i<n-1 and a[i]>a[i+1]):
                    ans=i+1
                    break
        print(ans)


if __name__=='__main__':
    solve()
