def get_next_node_in_order_of_node(node, visit_node, is_next):
    if is_next[0]:
        return visit_node
    if (visit_node == None):
        return None
    node_next = get_next_node_in_order_of_node(node, visit_node.left, is_next)
    if (node_next != None):
        return node_next
    if is_next[0]:
        return visit_node
    if (visit_node == node):
        is_next[0] = True
    node_next = get_next_node_in_order_of_node(node, visit_node.right, is_next)
    if (node_next != None):
        return node_next
    return None
def get_next_node_in_order_of_node(node, visit_node, is_next):
    if is_next[0]:
        return visit_node
    if (visit_node == None):
        return None
    node_next = get_next_node_in_order_of_node(node, visit_node.left, is_next)
    if (node_next != None):
        return node_next
    if is_next[0]:
        return visit_node
    if (visit_node == node):
        is_next[0] = True
    node_next = get_next_node_in_order_of_node(node, visit_node.right, is_next)
    if (node_next != None):
        return node_next
    return None