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 typing import *


def get_peaks(l: List[int]) -> List[int]:
    result = []
    current_max = l[0]
    for i in range(len(l)):
        current_element = l[i]
        if current_max < current_element:
            result.clear()
            current_max = current_element
            result.append(i)
        elif current_element == current_max:
            result.append(i)
    return result


def get_dominant(piranhas: List[int]) -> int:
    dominants = get_peaks(piranhas)
    if len(dominants) == 1:
        return dominants[0]
    elif len(dominants) == len(piranhas):
        return -2
    else:
        if dominants[0] != 0:
            return dominants[0]
        if dominants[-1] != len(piranhas) - 1:
            return dominants[-1]
        for i in range(1, len(dominants)):
            if dominants[i] - dominants[i - 1] != 1:
                return dominants[i - 1]
    return -2


def main():
    result = []
    for _ in range(int(input())):
        input()
        piranhas = [int(i) for i in input().split()]
        result.append(get_dominant(piranhas) + 1)
    for r in result:
        print(r)


if __name__ == '__main__':
    main()
