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_cases = range(int(input()))
for test_case in test_cases:
    n = int(input())
    pirs = list(map(int, input().split()))

    if len(set(pirs)) == 1:
        print(-1)
        continue
    max_val = max(pirs)
    for i, pir in enumerate(pirs):
        if pir == max_val and i>0 and i<n-1:
            if pirs[i-1] < pir or pirs[i+1] < pir:
                print(i+1)
                break
        if pir == max_val and i>0:
            if pirs[i-1] < pir:
                print(i+1)
                break
        if pir == max_val and i<n-1:
            if pirs[i+1] < pir:
                print(i+1)
                break
