bfs.java