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

import sys as _sys


def main():
    t = int(input())
    for i_t in range(t):
        n, = _read_ints()
        a = tuple(_read_ints())
        assert len(a) >= 1
        if len(a) == 1:
            result = 1
        elif len(set(a)) == 1:
            result = -1
        else:
            max_a = max(a)
            i = a.index(max_a)
            if i == 0 and a[i+1] == max_a:
                while a[i+1] == max_a:
                    i += 1
            result = i + 1
        print(result)


def _read_line():
    result = _sys.stdin.readline()
    assert result[-1] == "\n"
    return result[:-1]


def _read_ints():
    return map(int, _read_line().split())


if __name__ == '__main__':
    main()
