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 solve():
    n = int(input())
    lst = list(map(int, input().split()))
    m = max(lst)
    if m == min(lst):
        print(-1)
        return
    for i in range(n):
        if lst[i] == m:
            if i == 0:
                if lst[i+1]!=m:
                    print(i+1)
                    return
            elif i == n-1:
                if lst[i-1]!=m:
                    print(i+1)
                    return
            else:
                if lst[i - 1] != m or lst[i + 1] != m:
                    print(i+1)
                    return


if __name__ == '__main__':
    t = int(input())
    for _ in range(t):
        solve()
