#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main()
{
char str[200];
gets(str); //input str 会包含空格
for(int i = 0; str[i] != '\0'; ){
if(str[i] == ' '){
cout<<' ';
//如果是空格输出一个空格,并向后遍历直到不是空格为止,中间不输出
while(str[i] == ' ') i++;
}
else{
//如果字符不是空格直接输出并向后遍历
cout<< str[i];
i++;
}
}
cout<< endl;
return 0;
}