boolean diffInOne(String w, String end){
        int diff = 0;
        for(int i = 0; i < end.length(); ++i){
            if(w.charAt(i) != end.charAt(i)){
                ++diff;
                if(diff > 1) return false;
            }
        }
        return diff == 1? true : false;
    }