public HashMap<Integer, List<Integer>> constructAdjacencyList() throws IOException {
        HashMap<Integer, List<Integer>> adjacencyList = new HashMap<Integer, List<Integer>>();
        List<String> sequence = new ArrayList<String>();
        List<Integer> knotList = new ArrayList<Integer>();
        BufferedReader br = new BufferedReader((new FileReader(pathToFile)));
        String line = br.readLine();
        int knot = Integer.valueOf(line.substring(0, 1));
        StringTokenizer stringTokenizer = new StringTokenizer(line.substring(5), ",");
        List<Integer> adjacent = new ArrayList<Integer>();
        while (stringTokenizer.hasMoreElements()) {
            adjacent.add(Integer.valueOf((String) stringTokenizer.nextElement()));
        }
        adjacencyList.put(knot, adjacent);
        while (line != null) {
            line = br.readLine();
            if (line != null) {
                knot = Integer.valueOf(line.substring(0, line.indexOf(" ->")));
                knotList.add(knot);
                stringTokenizer = new StringTokenizer(line.substring(line.indexOf("-> ") + 3), ",");
                adjacent = new ArrayList<Integer>();
                while (stringTokenizer.hasMoreElements()) {
                    adjacent.add(Integer.valueOf((String) stringTokenizer.nextElement()));
                }
                adjacencyList.put(knot, adjacent);
            }
        }

        return adjacencyList;
    }