public static void sort_words(String s) {
        String[] words = s.replace(',', ' ').replaceAll("\\s+", " ").split(" ");
        Arrays.sort(words);
        for (String word : words) {
            System.out.println(word);
        }
    }