#include <iostream>
#include <cstdio>
#include <cstring>
#include <set>
using namespace std;
set<string> st;
string s;
char ch;
int main()
{
while(scanf("%c", &ch) != EOF)
{
if(isalpha(ch))
{
ch = tolower(ch);
s += ch;
}
else
{
st.insert(s);
s = "";
}
}
for(set<string>::iterator it = st.begin(); it != st.end(); ++it)
{
cout << *it << endl;
}
return 0;
}