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

test_cases = int(input())
while test_cases != 0:
    test_cases = test_cases - 1
    n = int(input())
    inp = list(map(int, input().split()))
    max_val = max(inp)
    indices = [i for i, _ in enumerate(inp) if _ == max_val]
    no = True
    for i in indices:
        if (0 <= i - 1 < n and inp[i] > inp[i - 1]) or (0 <= i + 1 < n and inp[i] > inp[i + 1]):
            print(i + 1)
            no = False
            break
    if no:
        print(-1)
