@@ -0,0 +1,949 @@
+import java.io.*;%0Aimport java.util.*;%0A%0Aclass WORDLIST%0A%7B%0A%09public static void main(String args%5B%5D) throws IOException%0A%09%7B%0A%09%09BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A%09%09int n = Integer.parseInt(br.readLine());%0A%0A%09%09Set%3CString%3E words = new HashSet%3CString%3E();%0A%0A%09%09for(int i = 0; i %3C n; i++)%0A%09%09%7B%0A%09%09%09String line = br.readLine().toLowerCase();%0A%09%09%09int start = 0;%0A%0A%09%09%09for(int j = 0; j %3C line.length(); j++)%0A%09%09%09%7B%0A%09%09%09%09char c = line.charAt(j);%0A%0A%09%09%09%09if(!Character.isLetter(c))%0A%09%09%09%09%7B%0A%09%09%09%09%09if(j - start %3E 0)%0A%09%09%09%09%09%7B%0A%09%09%09%09%09%09words.add(line.substring(start, j));%0A%09%09%09%09%09%7D%0A%0A%09%09%09%09%09start = j + 1;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%0A%09%09%09if(line.length() - start %3E 0)%0A%09%09%09%7B%0A%09%09%09%09words.add(line.substring(start, line.length()));%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09List%3CString%3E sortedWords = new ArrayList%3CString%3E(words);%0A%09%09Collections.sort(sortedWords);%0A%0A%09%09System.out.println(sortedWords.size());%0A%0A%09%09for(int i = 0; i %3C sortedWords.size(); i++)%0A%09%09%7B%0A%09%09%09System.out.println(sortedWords.get(i));%0A%09%09%7D%0A%0A%09%7D%0A%7D%0A

Create WORDLIST.java