#include<bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	cin>>s;
	int i=1;
	string reshte="";
	while(true)
	{
		if(i==s.length()-1)
		{
			cout<<reshte;
			break;
		}
		if(s[i]==',')
		{
			cout<<reshte<<"\n";
			reshte="";
		}
		else if(s[i]=='"')
		{
			i++;
			continue;
		}
		else
		{
			reshte+=s[i];
		}
		i++;
	}
	return 0;
}