1. 

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 10815 - Andy's First Dictionary
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1756
*
* @author Evgeni Pavlidis
* @version 1.0, 06/02/2010
*
* Method : Ad hoc
* Status : Accepted
* Runtime: 0.792
*/

import java.io.*;
import java.util.*;

class Main {

public static void main(String...args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

String input;
String[] inputs;
Set<String> dictionary = new TreeSet<String>();

while( (input = reader.readLine()) != null)
{
input = input.toLowerCase();
inputs = input.split("[^a-z]+");

for(String s: inputs)
dictionary.add(s);
}

dictionary.remove("");
for(String s: dictionary)
System.out.println(s);
}
}