Text Formatting
Many text formatting systems, such as T_EX or Wiki, use empty lines to divide text into paragraphs. The text consists of a sequence of words separated by spaces, newline characters, and the following punctuation marks: ",", ".", "?", "!", "-", ":", and "'" (ASCII codes 44, 46, 63, 33, 45, 58, 39). Each word in the text is made up of uppercase and lowercase Latin letters and digits. The text may contain several paragraphs, with adjacent paragraphs separated by one or more empty lines. There may also be one or more empty lines before the first paragraph and after the last paragraph.
The task is to format the given text according to specific rules. Each paragraph should be split into lines, with each line having a maximum length of w. The first line of each paragraph must begin with an indent of b spaces. Words within a line should be separated by exactly one space. If a word is followed by punctuation marks, they should immediately follow the word without any additional spaces. If the next word, along with any following punctuation marks, fits in the current line, it should be placed there. Otherwise, it should start a new line. In the formatted text, paragraphs should not be separated by empty lines, and there should be no trailing spaces at the end of lines.
Your task is to write a program that, given the numbers w and b, and the provided text, outputs the text formatted as described above.
Input
The first line of the input file contains two integers: w and b (5 ≤ w ≤ 100, 1 ≤ b ≤ 8, b < w).
This is followed by one or more lines containing the text. The length of a word in the text, including any following punctuation marks, does not exceed w, and the length of the first word of any paragraph, including any following punctuation marks, does not exceed (w - b).
The size of the input file does not exceed 100 KB. The length of each line in the input file does not exceed 250 characters.
Output
The output file must contain the text formatted according to the rules specified in the problem statement.