Tree -> Graph