#include char subtitle[1000]; int main() { gets(subtitle); for (char* p = subtitle; *p != NULL; ++p) { if (*p != '.' && *p != '-') { if (*p == ',') printf(" "); printf("%c", *p); } } return 0; }