find the path that connects two categories