{"raw_statement":[{"iden":"statement","content":"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_\".\n\nIn this task you are given a string _s_, which is composed by a concatination of terms, each of which may be:\n\n*   a positive integer of an arbitrary length (leading zeroes are not allowed),\n*   a \"comma\" symbol (\"_,_\"),\n*   a \"space\" symbol (\" \"),\n*   \"three dots\" (\"_..._\", that is, exactly three points written one after another, also known as suspension points).\n\nPolycarp wants to add and remove spaces in the string _s_ to ensure the following:\n\n*   each comma is followed by exactly one space (if the comma is the last character in the string, this rule does not apply to it),\n*   each \"three dots\" term is preceded by exactly one space (if the dots are at the beginning of the string, this rule does not apply to the term),\n*   if two consecutive numbers were separated by spaces only (one or more), then exactly one of them should be left,\n*   there should not be other spaces.\n\nAutomate Polycarp's work and write a program that will process the given string _s_."},{"iden":"input","content":"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."},{"iden":"output","content":"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."},{"iden":"examples","content":"Input\n\n1,2 ,3,...,     10\n\nOutput\n\n1, 2, 3, ..., 10\n\nInput\n\n1,,,4...5......6\n\nOutput\n\n1, , , 4 ...5 ... ...6\n\nInput\n\n...,1,2,3,...\n\nOutput\n\n..., 1, 2, 3, ..."}],"translated_statement":[{"iden":"statement","content":"Polycarp 非常细心。他甚至会像他的同学那样仔细地输入数字序列。如果他看到一个序列中逗号后没有空格、连续有两个空格，或出现其他不整齐的情况，他会立即纠正。例如，序列 \"_1,2 ,3,...,   10_\" 会被纠正为 \"_1, 2, 3, ..., 10_\"。\n\n在本题中，给定一个字符串 #cf_span[s]，它由若干项连接而成，每项可能是：\n\nPolycarp 希望通过添加和删除空格，使字符串 #cf_span[s] 满足以下要求：\n\n请自动化 Polycarp 的工作，编写一个程序处理给定的字符串 #cf_span[s]。\n\n输入数据包含一个字符串 #cf_span[s]。其长度为 1 到 255 个字符。字符串 #cf_span[s] 不以空格开头或结尾，其内容符合上述描述。\n\n请输出处理后的字符串 #cf_span[s]。你的程序输出必须与预期答案完全一致。允许输出行以换行符结尾，也可以不以换行符结尾。\n\n"},{"iden":"input","content":"输入数据包含一个字符串 #cf_span[s]。其长度为 1 到 255 个字符。字符串 #cf_span[s] 不以空格开头或结尾，其内容符合上述描述。"},{"iden":"output","content":"请输出处理后的字符串 #cf_span[s]。你的程序输出必须与预期答案完全一致。允许输出行以换行符结尾，也可以不以换行符结尾。"},{"iden":"examples","content":"输入\n1,2 ,3,...,     10\n输出\n1, 2, 3, ..., 10\n\n输入\n1,,,4...5......6\n输出\n1, , , 4 ...5 ... ...6\n\n输入\n...,1,2,3,...\n输出\n..., 1, 2, 3, ..."}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s \\in \\{ \\text{ASCII characters} \\}^* $ be the input string of length $ 1 \\leq |s| \\leq 255 $, with $ s \\notin \\text{leading or trailing space} $, and containing only digits, commas, dots, spaces, and possibly the substring `...`.\n\n**Constraints**  \n1. $ s $ contains terms separated by commas (`,`) and/or ellipses (`...`).  \n2. Terms are numeric sequences (digits only) or `...`.  \n3. No leading or trailing spaces in $ s $.  \n4. Spaces may be missing after commas, or multiple consecutive spaces may appear.  \n\n**Objective**  \nTransform $ s $ into $ s' $ such that:  \n- Every comma (`,`) is followed by exactly one space.  \n- Every ellipsis (`...`) is preceded and followed by exactly one space.  \n- All other spaces are removed, except the single space required after commas and around ellipses.  \n- No leading or trailing spaces in $ s' $.  \n- No two consecutive spaces in $ s' $.  \n\nFormally, $ s' $ is the unique string satisfying:  \n$$\ns' = \\text{normalize}(s)\n$$  \nwhere `normalize` applies the following rules in order:  \n1. Replace all occurrences of `...` with a placeholder (e.g., `__ELL__`) to avoid ambiguity.  \n2. Remove all spaces.  \n3. Insert a single space after every comma.  \n4. Insert a single space before and after every `...` (replacing the placeholder).  \n5. Trim leading/trailing spaces (though guaranteed not to exist).  \n\nOutput $ s' $.","simple_statement":null,"has_page_source":false}