def first_split_candidate(s):
    """DFS for the leftmost node >= 10."""
    if s.left is not None:
        if s.left.value is not None and s.left.value >= 10:
            return s, s.left.value

        left_candidate = first_split_candidate(s.left)
        if left_candidate is not None:
            return left_candidate

    if s.right is not None:
        if s.right.value is not None and s.right.value >= 10:
            return s, s.right.value

        right_candidate = first_split_candidate(s.right)
        if right_candidate is not None:
            return right_candidate

    return None