#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string word;
vector<string> v;
while (cin) {
if (cin >> word)
v.push_back(word);
}
for (unsigned int i = 0; i < v.size(); i++)
cout << v[i] << " ";
cout << endl;
}