This program finds a valid and invalid routes for given graph, i.e once the route is consumed you cant consume same route to travel.