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

from sys import stdin, gettrace

if gettrace():
    inputi = input
else:
    def input():
        return next(stdin)[:-1]


    def inputi():
        return stdin.buffer.readline()


def solve():
    n = int(inputi())
    aa = [int(a) for a in inputi().split()]
    if all(a == aa[0] for a in aa):
        print(-1)
        return
    ma = max(aa)
    f = aa.index(ma)
    if f > 0:
        print(f+1)
        return
    for i, a in enumerate(aa):
        if a != ma:
            print(i)
            return

def main():
    t = int(inputi())
    for _ in range(t):
        solve()


if __name__ == "__main__":
    main()
