private Set<String> getAdjacent(Set<String> dict, String word) {
            Set<String> adjSet = new LinkedHashSet<>();
            StringBuilder sb = new StringBuilder(word);
            int length = word.length();
            for (int i = 0; i < length; i++) {
                char ch = sb.charAt(i);
                for (char c = 'a'; c < 'z'; c++) {
                    if (ch == c)    continue;
                    
                    sb.setCharAt(i, c);
                    if (dict.contains(sb.toString())) {
                        adjSet.add(sb.toString());
                        dict.remove(sb.toString());
                    }
                }
                sb.setCharAt(i, ch);
            }
            
            return adjSet;
        }