#include
#include
using namespace std;
void Readability(string S)
{
int i=0;
int j;
j=i+1;
while(j<S.length() && i<S.length())
{
while(S[j]>=97 && S[j]<=122 && j<S.length())
j++;
for(;i<=j-1;i++)
cout<<S[i];
cout<<endl;
i=j;
j++;
}
}
int main()
{
string S;
getline(cin,S);
Readability(S);
}