//********************************
//*????1.cpp                **
//*??????????         **
//*?????? 1200012834      **
//*???2012.11.30             **
//********************************


void del(char str[100])         // ????????del
{
	char *p = str;              // ????*p
	int count;                  // count???????????
	for (; *p != '\0'; p++)     // ??????
	{
		if (*p == ' ' && *(p+1) == ' ')  // ????????????????
		{
			char *q, temp;
			count = 0;
			for (q = p + 1; *(q+1) != '\0'; q++) // ??*q?p+1??????
			{
				temp = *q;
				*q = *(q+1);
				*(q+1) = temp;   // ?p+1???????????
				count++;
			}
			*(p+1+count) = '\0';  // ???????????\0??
			p = p - 1;            // ??????????
		}
	}
	cout << str;
}

int main()
{
	char str[100];
	cin.getline(str, 100);  // ?????
	del(str);
	return 0;
}