123456789101112131415
#include<iostream> using namespace std; int main() { const int n=100; char a[n], *t; cin.getline(a,n,'.'); t=strtok(a,","); while(t) { cout<<t<<endl; t=strtok(NULL,","); } return 0; }