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

q = int(input())

for _ in range(q):
    n = int(input())
    st = input().split()

    maX = 0
    miN = 1000000000
    ids_maX = []
    ids_miN = []
    for i, x in enumerate(list(map(int, st))):
        if x > maX:
            maX = x
            ids_maX = [i]
        elif x == maX:
            ids_maX.append(i)
        if x < miN:
            miN = x
            ids_miN = [i]
        elif x == miN:
            ids_miN.append(i)

    if miN == maX:
        print(-1)
    else:
        if len(ids_maX) > 2 or (len(ids_maX) > 1 and ids_maX[0] == 0 and ids_maX[1] == 1) or\
                (len(ids_maX) > 1 and ids_maX[-1] == len(st) - 1 and ids_maX[-2] == len(st) - 2):
            #print(ids_miN, st)
            for x in ids_maX:
                if 0 < x < len(st) - 1:
                    if int(st[x - 1]) != maX or int(st[x + 1]) != maX:
                        print(x + 1)
                        break
                elif x == 0:
                    if int(st[x + 1]) != maX:
                        print(x + 1)
                        break
                elif x == len(st) - 1:
                    if int(st[x - 1]) != maX:
                        print(x + 1)
                        break
        else:
            print(ids_maX[0] + 1)