private static List<String> getAllSimilarStrings(String str, List<String> dictionary) {
        List<String> similar = new ArrayList<>();

        for(int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);

            char[] array = str.toCharArray();

            // change
            for(char j = 'a'; j <= 'z'; j++) {
                if(j == c) {
                    continue;
                }

                array[i] = j;
                String check = new String(array);
                if(dictionary.contains(check)) {
                    similar.add(check);
                }
            }

            // add
            for(char j = 'a'; j <= 'z'; j++) {

                String check = str.substring(0, i + 1) + j + ((i + 1) != str.length() ? str.substring(i + 1, str.length()) : "");
                if(dictionary.contains(check)) {
                    similar.add(check);
                }
            }

            String check = str.substring(0, i) + ((i + 1) != str.length() ? str.substring(i + 1, str.length()) : "");
            if(dictionary.contains(check)) {
                similar.add(check);
            }
        }

        return similar;
    }