def serialized(self):
        to_ret = {}
        for group, requirements in self.items():
            to_ret[group] = [str(requirement) for requirement in requirements]
        return to_ret
def split(root, minRight):
    if root is None:
        return None, None
    if root.key >= minRight:
        left, right = split(root.left, minRight)
        root.left = right
        root.update()
        return left, root
    else:
        left, right = split(root.right, minRight)
        root.right = left
        root.update()
        return root, right