//Code by Patcas Csaba #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define LL long long #define PII pair #define VB vector #define VI vector #define VD vector #define VS vector #define VPII vector > #define VVI vector < VI > #define VVB vector < VB > #define FORN(i, n) for(int i = 0; i < (n); ++i) #define FOR(i, a, b) for(int i = (a); i <= (b); ++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define REPEAT do{ #define UNTIL(x) }while(!(x)); #define SZ size() #define BG begin() #define EN end() #define CL clear() #define X first #define Y second #define RS resize #define PB push_back #define MP make_pair #define ALL(x) x.begin(), x.end() #define IN_FILE "a.in" #define OUT_FILE "a.out" string s; int main() { //Read data //freopen(IN_FILE, "r", stdin); //freopen(OUT_FILE, "w", stdout); getline(cin, s); while (s.find(".") != -1) { s.replace(s.find("."), 1, ""); } while (s.find("-") != -1) { s.replace(s.find("-"), 1, ""); } //Solve int i = 0; while (i < s.SZ) { if (s[i] == ',' && (i > 0 || s[i - 1] != ' ')) { s.insert(i, " "); ++i; } ++i; } cout << s << endl; //Write data return 0; }