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, os.path
from collections import*
from heapq import *
from copy import*
import math
mod=10**9+7
if(os.path.exists('input.txt')):
    sys.stdin = open("input.txt","r")
    sys.stdout = open("output.txt","w")   
 
for t in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    maxx=max(a)
    if(a.count(maxx)==n):
        print(-1)
    else:
        ans=0
        for i in range(n-1):
            if(a[i]==maxx and a[i+1]==maxx):
                continue 
            elif(a[i]==maxx or a[i+1]==maxx):
                if(a[i]==maxx):
                    ans=i+1
                    break
                else:
                    ans=i+2
                    break

                
            
        print(ans)



