/**
 *@ file    1000012834_003homework.cpp
 *@ author  ???
 *@ date    2010-12-9
 *@ description 
 *          ???????????
 */
int main()
{
	char *p;		// ????????????p
	char str[50];		// ?????????str
	cin.getline(str,31);	// ?????????
	p = str;		// ????????
	while(*p != 0)		// ??????????
	{
		while((*p >= '0') && (*p <= '9'))	// ??????
		{
			cout << *p;	// ??????
			p++;		// ?????????????
		}
		cout << endl;	// ???????????

		// ?????????????????????????????
		while(!((*p >= '0') && (*p <= '9')) && (*p != 0))
			p++;
	}

	return 0;
}