import collections


def is_valid_matching(matching):
    """
    Matching proposal should not contain duplicate values except -1.
    """
    cnt = collections.Counter(matching)
    for k in cnt:
        if k != -1 and cnt[k] > 1:
            return False
    return True