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 solve2(a):
    if len(set(a)) == 1:
        return -1
    if len(a) == 1:
        return 1

    ma = max(a)

    for idx, p in enumerate(a):
        if p != ma:
            continue
        # check right
        if idx < (len(a) - 1) and p > a[idx + 1]:
            return idx + 1
        # check left
        if idx > 0 and p > a[idx - 1]:
            return idx + 1


def run():
    t, *_ = list(map(int, input().split()))
    for _ in range(t):
        n, *_ = list(map(int, input().split()))
        a = list(map(int, input().split()))
        print(solve2(a))


if __name__ == '__main__':
    run()
