#include <bits/stdc++.h>
using namespace std;
int main()
{
set<string>st;
set<string>::iterator it=st.begin();
string s="";
char sen[1000000];
long long int i,j,k,l,m,x;
//freopen("10815.txt","r",stdin);
//freopen("10815out.txt","w",stdout);
while(gets(sen))
{
for(i=0;i<strlen(sen);i++)
{
s="";
while(1)
{
if(isupper(sen[i]))
{
sen[i]=tolower(sen[i]);
}
if(sen[i]==' ' || sen[i]=='\"' || sen[i]=='\0')
{
break;
}
else if(sen[i]>='a' && sen[i]<='z')
{
s=s+sen[i];
}
else
{
break;
}
i++;
}
st.insert(s);
//cout<<s<<endl;
}
}
x=1;
for(it=st.begin();it!=st.end();it++)
{
if(x!=1)
{
cout<<*it<<endl;
}
x++;
}
return 0;
}
0 comments:
Post a Comment