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

test = int(input())

for _ in range(test):
    length = int(input())
    a = input().split()
    a = [int(i) for i in a]

    max_value = max(a)
    flag1 = False
    flag2 = False
    for i in range(0, len(a)):
        if(a[i] == max_value):
            if(i - 1 >= 0):
                if a[i] > a[i - 1]:
                    flag1 = True
            if(i + 1 <= length - 1):
                if a[i] > a[i + 1]:
                    flag2 = True

        if flag1 or flag2:
            print(i + 1)
            break
    if not flag1 and not flag2:
        print(-1)




