Added a solution that completely tries all possible routes.