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
from os import path
if(path.exists('input.txt')):
    sys.stdin = open("input.txt","r")
    sys.stdout = open("output.txt","w")

t=int(input())
for i in range(t):
    n=int(input())
    p=list(map(int, input().split()))
    count = 0
    if max(p) == min(p):
        print(-1)
    else:
        mn=max(p)
        if (p[0]==mn) and p[0+1]<p[0]:
            print(1)
            continue
        elif (p[len(p)-1]==mn) and p[len(p)-2]<p[len(p)-1]:
            print(len(p))
            continue
        for j in range(1, len(p)-1):
            if (p[j]==mn):
                if p[j] > p[j-1] or p[j] > p[j+1]:
                    print(j+1)
                    break
        else:
            print(-1)
            