I think there's a problem to recover the path, because `explored` is only going to be filled more and more. Therefore at the latter part of the run, you will be able to assemble partial path, because what's filled can't be unfilled to finish those path.