Modified the breadth_first_search to ave the path send right