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

t = int(input())

for i in range(t):
    n = int(input())
    v = input()
    v = v.split()
    v = [int(i) for i in v]

    maxi = max(v)
    okay = True

    if v[0] == maxi and v[0] > v[1]:
        print(1)
        okay = False

    if v[len(v)-1] == maxi and maxi > v[len(v)-2]:
        if okay:
            print(len(v))
            okay = False

    for i in range(1, len(v)-1):
        if v[i] == maxi and (v[i-1] < maxi or v[i+1] < maxi) and okay:
            print(i+1)
            okay = False
            break

    if okay:
        print(-1)
