#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char str[100];
cin.getline(str, sizeof(str));
int index = 0;
while(index < strlen(str))
{
if(str[index] == ' ' && str[index + 1] == ' ')
{
int first = index + 1, last;
for(last = first + 1; str[last] == ' '; ++last);
strcpy(str + first, str + last);
}
++index;
}
cout << str;
}