// AdjMatrix to AdjLists - mjd@cs.auckland.ac.nz import java.io.*; import graphs.*; public class matrix2lists { public static void main(String argv[]) { try { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); GraphAdjMatrix G; do { G = new GraphAdjMatrix(input); System.out.print(G.toStringAdjLists()); } while(G.order() > 0); } catch ( Exception e ) { System.err.println("Exception: "+e); } } } // matrix2lists