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 solve(n, s):
    s1 = s.copy()
    s1.sort()
    if s1[0] == s1[-1] and n > 1:
        return -1
    else:
        if s[0] == s1[-1] and s[1] < s[0]:
            return 1
        elif s[-1] == s1[-1] and s[-2] < s[-1]:
            return n
        else:
            for i in range(1, n - 1):
                if s[i] == s1[-1] and (s[i - 1] < s[i] or s[i + 1] < s[i]):
                    return i + 1
t = int(input())
for i in range(0, t):
    print(solve(int(input()), list(map(int, input().split()))))