Polycarp is very careful. He even types numeric sequences carefully, unlike his classmates. If he sees a sequence without a space after the comma, with two spaces in a row, or when something else does not look neat, he rushes to correct it. For example, number sequence written like "1,2 ,3,..., 10" will be corrected to "1, 2, 3, ..., 10".
In this task you are given a string s, which is composed by a concatination of terms, each of which may be:
Polycarp wants to add and remove spaces in the string s to ensure the following:
Automate Polycarp's work and write a program that will process the given string s.
The input data contains a single string s. Its length is from 1 to 255 characters. The string s does not begin and end with a space. Its content matches the description given above.
Print the string s after it is processed. Your program's output should be exactly the same as the expected answer. It is permissible to end output line with a line-break character, and without it.
1,2 ,3,..., 10
1, 2, 3, ..., 10
1,,,4...5......6
1, , , 4 ...5 ... ...6
...,1,2,3,...
..., 1, 2, 3, ...
Name |
---|