List<String> getCandidates(HashSet<String> hs, String word, Set<String> wordList) {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < word.length(); i++) {
            for(char c = 'a'; c <= 'z'; c++) {
                if (word.charAt(i) == c)
                    continue;
                char[] chars = word.toCharArray();
                chars[i] = c;
                String newWord = new String(chars);
                if (!hs.contains(newWord) && wordList.contains(newWord))
                    list.add(newWord);
            }
        }
        return list;
    }