poj1077. BFS-TLE. revisit later