Added BFS abstract class that can be used to list all the paths