#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string s;
getline(cin,s);
int n=s.length();
for(int i=0;i<n;i++)
{
int j=i;
while(j<n && s[j]!=' ') j++;
for(int k=i;k<j;k++)
cout<<s[k];
cout<<endl;
i=j;
}
return 0;
}