first try to figure out the route from a to b to c for a given graph input