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
max_int = 1000000001  # 10^9+1
min_int = -max_int

t = int(input())
for _t in range(t):
    n = int(sys.stdin.readline())
    a = list(map(int, sys.stdin.readline().split()))
    mx = -1
    out = -2
    la = len(a)
    for i, one in enumerate(a):
        if one >= mx:
            mx = one
            if i != 0 and a[i-1] < a[i] or i != la - 1 and a[i+1] < a[i]:
                out = i
    print(out + 1)