private void getLadders(Node startNode, Node node, List<String> ladder, List<List<String>> allLadders) {
            List<String> newLadder = new ArrayList<>();
            newLadder.addAll(ladder);
            newLadder.add(0, node.value);
            if (node.value.equals(startNode.value)) {
                allLadders.add(newLadder);
            } else {
                for (Node n : node.prevs) {
                    getLadders(startNode, n, newLadder, allLadders);
                }
            }
            
        }