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

for i in range(int(input())):
    input()
    alef = list(map(int, input().split()))
    alefMn = set(alef)
    if len(alefMn)==1:
        print(-1)
        continue
    index = 0
    for i in range(len(alef)):
        if i != 0 and i != len(alef)-1:
            if alef[i] > alef[i-1] or alef[i] > alef[i+1]:
                if index==0:
                    index = i+1
                elif alef[index-1] < alef[i]:
                    index = i+1
        if i == 0:
            if alef[i] > alef[i+1]:
                index = 1
        if i == len(alef)-1:
            if alef[i] > alef[i-1]:
                if index==0:
                    index = i+1
                elif alef[index-1] < alef[i]:
                    index = i+1
    print(index)