#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
set<string>st;
while(getline(cin, s))
{
string a = "";
for(int i=0;i<s.size();i++)
{
if((s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= 'a' && s[i] <= 'z'))
{
if(s[i] >= 'A' && s[i] <= 'Z')
{
s[i] = s[i] - 32;
}
a = a + s[i];
}
else
{
if(a != "")
st.insert(a);
a = "";
}
}
}
for(auto it = st.begin(); it != st.end(); it++)
cout << *it << "\n";
return 0;
}
using namespace std;
int main()
{
string s;
set<string>st;
while(getline(cin, s))
{
string a = "";
for(int i=0;i<s.size();i++)
{
if((s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= 'a' && s[i] <= 'z'))
{
if(s[i] >= 'A' && s[i] <= 'Z')
{
s[i] = s[i] - 32;
}
a = a + s[i];
}
else
{
if(a != "")
st.insert(a);
a = "";
}
}
}
for(auto it = st.begin(); it != st.end(); it++)
cout << *it << "\n";
return 0;
}
Comments
Post a Comment