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

def test():
    n = input()
    fish = list(map(int, input().split()))
    mini = min(fish)
    maxi = max(fish)
    if mini == maxi:
        print(-1)
    else:
        for fin in range(len(fish)):
            if fish[fin] == maxi:
                if fin > 0 and fish[fin - 1] < maxi:
                    print(fin + 1)
                    return
                if fin < len(fish) - 1 and fish[fin + 1] < maxi:
                    print(fin + 1)
                    return


T = int(input())

for t in range(T):
    test()
