def belongs(outSequence, group, minMatches):
    """
    Returns True if there's at least 'minMatches' matches between outSequence and any sequence 
    from 'group'; False otherwise.
    Size of all sequences is assumed to be equal.
    """
    for inSequence in group:
        matches = 0
        for i in range(len(outSequence)):
            if outSequence[i] == inSequence[i]:
                matches += 1
            if matches >= minMatches:
                return True
    return False
