import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Set;
import java.util.TreeSet;
public class Main {
private static boolean isLetter(char c) {
return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z');
}
while (reader.ready()) {
String currentLine
= reader.
readLine(); StringBuilder currentWord = new StringBuilder();
boolean wasLetter = false;
int lengthLine = currentLine.length();
for (int i = 0; i < lengthLine; ++i) {
if (isLetter(currentLine.charAt(i))) {
currentWord.append(currentLine.charAt(i));
wasLetter = true;
} else if (wasLetter) {
uniqueWords.add(currentWord.toString());
currentWord = new StringBuilder();
wasLetter = false;
}
}
if (currentWord.length() != 0) {
uniqueWords.add(currentWord.toString());
}
}
}
Set<String> uniqueWords = new TreeSet<>();
parseToWords(reader, uniqueWords);
for (String currentWord
: uniqueWords
) { System.
out.
println(currentWord
); }
}
}
aW1wb3J0IGphdmEuaW8uQnVmZmVyZWRSZWFkZXI7CmltcG9ydCBqYXZhLmlvLklPRXhjZXB0aW9uOwppbXBvcnQgamF2YS5pby5JbnB1dFN0cmVhbVJlYWRlcjsKaW1wb3J0IGphdmEudXRpbC5TZXQ7CmltcG9ydCBqYXZhLnV0aWwuVHJlZVNldDsKCnB1YmxpYyBjbGFzcyBNYWluIHsKICAgIHByaXZhdGUgc3RhdGljIGJvb2xlYW4gaXNMZXR0ZXIoY2hhciBjKSB7CiAgICAgICAgcmV0dXJuICgnQScgPD0gYyAmJiBjIDw9ICdaJykgfHwgKCdhJyA8PSBjICYmIGMgPD0gJ3onKTsKICAgIH0KCiAgICBwcml2YXRlIHN0YXRpYyB2b2lkIHBhcnNlVG9Xb3JkcyhCdWZmZXJlZFJlYWRlciByZWFkZXIsIFNldDxTdHJpbmc+IHVuaXF1ZVdvcmRzKSB0aHJvd3MgSU9FeGNlcHRpb24gewogICAgICAgIHdoaWxlIChyZWFkZXIucmVhZHkoKSkgewogICAgICAgICAgICBTdHJpbmcgY3VycmVudExpbmUgPSByZWFkZXIucmVhZExpbmUoKTsKICAgICAgICAgICAgU3RyaW5nQnVpbGRlciBjdXJyZW50V29yZCA9IG5ldyBTdHJpbmdCdWlsZGVyKCk7CiAgICAgICAgICAgIGJvb2xlYW4gd2FzTGV0dGVyID0gZmFsc2U7CiAgICAgICAgICAgIGludCBsZW5ndGhMaW5lID0gY3VycmVudExpbmUubGVuZ3RoKCk7CiAgICAgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbGVuZ3RoTGluZTsgKytpKSB7CiAgICAgICAgICAgICAgICBpZiAoaXNMZXR0ZXIoY3VycmVudExpbmUuY2hhckF0KGkpKSkgewogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRXb3JkLmFwcGVuZChjdXJyZW50TGluZS5jaGFyQXQoaSkpOwogICAgICAgICAgICAgICAgICAgIHdhc0xldHRlciA9IHRydWU7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHdhc0xldHRlcikgewogICAgICAgICAgICAgICAgICAgIHVuaXF1ZVdvcmRzLmFkZChjdXJyZW50V29yZC50b1N0cmluZygpKTsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50V29yZCA9IG5ldyBTdHJpbmdCdWlsZGVyKCk7CiAgICAgICAgICAgICAgICAgICAgd2FzTGV0dGVyID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGN1cnJlbnRXb3JkLmxlbmd0aCgpICE9IDApIHsKICAgICAgICAgICAgICAgIHVuaXF1ZVdvcmRzLmFkZChjdXJyZW50V29yZC50b1N0cmluZygpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgSU9FeGNlcHRpb24gewogICAgICAgIEJ1ZmZlcmVkUmVhZGVyIHJlYWRlciA9IG5ldyBCdWZmZXJlZFJlYWRlcihuZXcgSW5wdXRTdHJlYW1SZWFkZXIoU3lzdGVtLmluKSk7CiAgICAgICAgU2V0PFN0cmluZz4gdW5pcXVlV29yZHMgPSBuZXcgVHJlZVNldDw+KCk7CiAgICAgICAgcGFyc2VUb1dvcmRzKHJlYWRlciwgdW5pcXVlV29yZHMpOwogICAgICAgIGZvciAoU3RyaW5nIGN1cnJlbnRXb3JkIDogdW5pcXVlV29yZHMpIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKGN1cnJlbnRXb3JkKTsKICAgICAgICB9CiAgICB9Cn0=