flatten_tree_to_linked_list.py