private void run() {
    int numCols;
    int numRows;


    Scanner sc = new Scanner(System.in);
    int numSheets = sc.nextInt();

    for (int sheet = 1; sheet <= numSheets; sheet++) {
      numCols = sc.nextInt();
      numRows = sc.nextInt();
      sc.nextLine();

      // Create a new spread sheet.
      cells = new Vertex[numRows][numCols];
      ArrayList<Vertex> graph = new ArrayList<Vertex>();

      // Read in our rows.
      for (int row = 0; row < numRows; row++) {
        String rowStr = sc.nextLine();
        String[] columns = rowStr.split(" ");
        for (int col = 0; col < numCols; col++) {
          if (cells[row][col] == null) {
            cells[row][col] = new Vertex(row, col, columns[col]);
          } else {
            cells[row][col].setContents(columns[col]);
          }
          // Add in all the vertices into the main graph.
          graph.add(cells[row][col]);
        }
      }

      // Get our path around the spread sheet.
      //ArrayList<Vertex> path = TopologicalSort(graph);
      System.out.printf("%d:\n", sheet);
      if (!TopologicalSort(graph)) {
        // No path found, so print we have no path.
        System.out.println("Not computable!");
      } else {
        // print the output.
        for (int row = 0; row < numRows; row++) {
          for (int col = 0; col < numCols; col++) {
            System.out.printf("%d ", cells[row][col].value);
          }
          System.out.println();
        }
      }
    }
  }