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

a = int(input())
for k in range(a):
    c = int(input())
    b = list(map(int, input().split()))
    d = max(b)
    e = b.count(d)
    if e == c:
        print(-1)
    else:
        for f in range(c):
            if b[f] == d:
                if f != 0 and f != c - 1:
                    if b[f - 1] < b[f]:
                        print(f + 1)
                        break
                    elif b[f + 1] < b[f]:
                        print(f + 1)
                        break
                else:
                    if f == 0 and b[1] < b[0]:
                        print(1)
                        break
                    elif f == c - 1 and b[c - 2] < b[-1]:
                        print(c)
                        break