def get_root_node(node):
    root = node
    while (node.parent != None):
        node = node.parent
    return node
def get_root_node(node):
    root = node
    while (node.parent != None):
        node = node.parent
    return node