<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_first_relation(cls, vertex0, vertex1):
 """Intialize a fresh match based on the first relation"""

        result = cls([(vertex0, vertex1)])
        result.previous_ends1 = set([vertex1])
        return result