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

if __name__ == "__main__":
    t = int(input())
    for w in range(t):
        n = int(input())
        l = [int(x) for x in input().split()]
        max = int(-10e10)
        for k in l:
            if k > max:
                max = k
                index = l.index(k)
        count = 0
        flag = True
        for z in range(len(l)):
            if l[z] == max:
                if flag and z - 1 >= 0 and z + 1 < len(l):
                    if l[z - 1] != max:
                        index = z 
                        flag = False
                    elif l[z + 1] != max:
                        index = z 
                        flag = False
                count += 1
        if count != len(l):
            print(index + 1)
        else:
            print(-1)