#include <iostream>
#include <string>
using namespace std;
int main()
{
string a;
getline(cin,a);
string b;
b+=a[0];
for (int i=1; i<a.length(); i++)
{
if ((a[i]!=' ')|| ((a[i]==' ') and (a[i-1]!=' '))) b+=a[i];
}
cout<<b;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSAKeyAKICAgc3RyaW5nIGE7CiAgIGdldGxpbmUoY2luLGEpOwogICBzdHJpbmcgYjsKICAgYis9YVswXTsKICAgZm9yIChpbnQgaT0xOyBpPGEubGVuZ3RoKCk7IGkrKykKICAgewogICAgIGlmICgoYVtpXSE9JyAnKXx8ICgoYVtpXT09JyAnKSBhbmQgKGFbaS0xXSE9JyAnKSkpIGIrPWFbaV07CiAgIH0KICAgY291dDw8YjsKICAgCgoJcmV0dXJuIDA7Cn0=