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

#!/usr/bin/python3

ns = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

"Codeforces Round #677 (Div. 3)"
"A. Boring Apartments"
# for _ in range(ni()):
#     a=ni()
#     s=10*((a%10)-1)
#     l=len(str(a))
#     s+=(l*(l+1))//2
#     print(s)
"B. Yet Another Bookshelf"
# for _ in range(ni()):
#     n=ni()
#     a=nl()
#     f=l=z=0
#     i=-1
#     while f==0:
#         i+=1
#         f=a[i]
#     f=i
#     i=n
#     while l==0:
#         i-=1
#         l=a[i]
#     l=i
#     i=f
#     while i<=l:
#         if a[i]==0:
#             z+=1
#         i+=1
#     print(z)
"C. Dominant Piranha"
for _ in range(ni()):
    n=ni()
    a=nl()
    m=ind=summ=0
    for i in range(n):
        summ+=a[i]
        if a[i]>m:
            m=a[i]
        if i-1>-1:
            if a[i-1]<m and a[i]==m:
                ind=i
        if i+1<n:
            if a[i+1]<m and a[i]==m:
                ind=i
    if summ==n*m:
        print(-1)
    else:
        print(ind+1)