from typing import Sequence
from typing import List


def contour_matrix(
        contour: Sequence,
) -> List:
    
    """Given a contour list, returns its matrix.
    """    
    result = []
    for i in contour:
        sub = []
        for j in contour:
            val = j - i
            if val != 0:
                val = int(val/abs(val))
            sub.append(val)
        result.append(sub)
    return result