<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def end(self) -> "GameNode": """Follows the main variation to the end and returns the last node."""

        node = self

        while node.variations:
            node = node.variations[0]

        return node