https://vjudge.net/problem/UVA-10815
#include<iostream>
#include<sstream>
#include<set>
#include<string>
using namespace std;
#pragma warning(disable:4996)
const int maxn = 30;
int main()
{
#ifdef _DEBUG
//freopen("in", "rb", stdin);
//freopen("out", "wb", stdout);
#endif // _DEBUG
set<string> all;
string s;
while (cin >> s) {
for (auto &x : s) {
if (isalpha(x)) x = tolower(x);
else x = ' ';
}
stringstream ss(s);
while (ss >> s) all.insert(s);
}
for (auto x : all)
cout << x << endl;
}