public static void main(String[] args) {

        Assert.checkNonNull(inputFileName, "InputFileName cannot be null");

        try {
            // String buffer for storing the output
            StringBuilder output = new StringBuilder();

            // read and parse input file
            URL fileUrl = classLoader.getResource(inputFileName);
            if (fileUrl == null) {
                System.out.println("File URL null. EXITING!");
                return;
            }
            String filePath = fileUrl.getPath();
            BufferedReader reader = Files.newBufferedReader(Paths.get(filePath), StandardCharsets.UTF_8);
            String strLine;

            int lineNumber = 0;
            int noOfTestCases = -1;
            int activeTestCaseNumber = 0;
            int lineInTestCase = 0;
            int answer1 = -1;
            int answer2 = -1;
            List<String> round1Rows = new ArrayList<>();
            List<String> round2Rows = new ArrayList<>();

            while ((strLine = reader.readLine()) != null) {

                if (lineNumber == 0) {
                    noOfTestCases = Integer.parseInt(strLine);
                    activeTestCaseNumber ++;
                    lineInTestCase ++;
                } else {

                    if (lineInTestCase <= 10) {
                        if (lineInTestCase == 1) {
                            answer1 = Integer.parseInt(strLine);
                        } else if (lineInTestCase == 6) {
                            answer2 = Integer.parseInt(strLine);
                        } else {
                           if (answer2 == -1) {
                               round1Rows.add(strLine);
                           } else {
                               round2Rows.add(strLine);
                           }
                        }
                        lineInTestCase ++;
                    } else {

                        // Now that a test case has been parsed, compute output for
                        // this test case

                        // Invoke algorithm here
                        String solutionToTestCase = compute(answer1, answer2, round1Rows, round2Rows);

                        // Prepare output string
                        System.out.println(solutionToTestCase);
                        output.append("Case #").append(activeTestCaseNumber).append(": ").append(solutionToTestCase);
                        output.append("\n");

                        // Prepare next test case
                        answer1 = Integer.parseInt(strLine);
                        lineInTestCase = 2;
                        answer2 = -1;
                        round1Rows = new ArrayList<>();
                        round2Rows = new ArrayList<>();
                        activeTestCaseNumber ++;
                    }
                }
                lineNumber++;
            }

            // Compute last test case
            String solutionToTestCase = compute(answer1, answer2, round1Rows, round2Rows);
            // Prepare output string
            System.out.println(solutionToTestCase);
            output.append("Case #").append(activeTestCaseNumber).append(": ").append(solutionToTestCase);
            output.append("\n");

            // Pass output string to method to write to file
            writeOutputToFile(output.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
    }