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

# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

t = 1
t = int(input())

while t:
    t -= 1

    n = int(input())
    a = list(map(int, input().split()))
    # b = list(map(int, input().split()))
    # s = input()
    max_size = max(a)
    for i in range(n-1):
        if a[i] == max_size and a[i+1] != max_size:
            print(i+1)
            break
    else:
        for i in range(1, n):
            if a[i] == max_size and a[i-1] != max_size:
                print(i+1)
                break
        else:
            print(-1)