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

'''
def piraajaRec(l, ii, n): # l on kalad ja i on indeks
    if len(l) <= 1:
        return True
    if ii != 0:
        if l[ii] > l[ii-1]:
            m = l.copy()
            m[ii] += 1
            del m[ii-1]
            return piraajaRec(m, max(0, ii-1), n)

    if ii != n-1:
        if l[ii] > l[ii+1]:
            m = l.copy()
            m[ii] += 1
            del m[ii+1]
            return piraajaRec(m, max(0, ii), n)

#Rekursiivne kasutab liiga palju mälu

t = int(input())
for j in range(t):
    var = None
    n = int(input())
    kalad = [ int(x) for x in input().split() ]
    for i in range(n):
        var = piraajaRec(kalad, i, n)
        if var == True:
            print(i+1)
            break
    if var == None:
        print("-1")
'''

t = int(input())
for j in range(t):
    printed = False
    n = int(input())
    kalad = [ int(x) for x in input().split() ]
    maks = max(kalad)
    if kalad.count(maks) == n:
        print("-1")
        continue
    else:
        idx = [index for index, element in enumerate(kalad) if element == maks]
        for y in idx:
            if kalad[max(0, y-1)] < maks or kalad[min(n-1, y+1)] < maks:
                if printed == False:
                    print(y+1)
                printed = True
        if printed == False:
            print("-1")