import java.util.Scanner; import java.io.FileReader; import java.io.FileNotFoundException; public class DemoReachability { public static void main(String[] args) throws FileNotFoundException { Scanner getFileInput = new Scanner(new FileReader("input")); // first input is number of nodes Reachability reach = new Reachability(getFileInput.nextInt()); // next inputs are the incident nodes (with a count per node) for (int i=0; i