#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string query;
getline(cin, query);
string word;
bool dele = false;
for (int i = 0; i != query.size(); ++i) {
if (c[i] == ' ')
if(dele == true) {
query.erase(i, 1);
else {
dele = true;
}
else{dele = false;}
}
cout << query << endl;
}